_abnf.ABNF._is_valid_close_status: Make method static

This commit is contained in:
Allan Lewis 2016-04-27 11:22:53 +01:00
parent a49a3c22df
commit f0f3cc129b
1 changed files with 2 additions and 1 deletions

View File

@ -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):