_abnf.ABNF._is_valid_close_status: Make method static
This commit is contained in:
parent
a49a3c22df
commit
f0f3cc129b
@ -148,7 +148,8 @@ class ABNF(object):
|
||||
if not self._is_valid_close_status(code):
|
||||
raise WebSocketProtocolException("Invalid close opcode.")
|
||||
|
||||
def _is_valid_close_status(self, code):
|
||||
@staticmethod
|
||||
def _is_valid_close_status(code):
|
||||
return code in VALID_CLOSE_STATUS or (3000 <= code <5000)
|
||||
|
||||
def __str__(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user