From e97f3183df29c45d4a5c9a012d1b41d32fa7edfa Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Fri, 7 Sep 2012 22:14:22 +0000 Subject: [PATCH] PEP8 changes from @jfriedly --- websocket.py | 6 +++--- websockify | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/websocket.py b/websocket.py index 1ca5093..7e200ea 100644 --- a/websocket.py +++ b/websocket.py @@ -139,10 +139,10 @@ Sec-WebSocket-Accept: %s\r '4': logging.INFO, '5': logging.DEBUG, } - if int(loglevel) > 5: loglevel = 5 + if int(loglevel) > 5: loglevel = '5' logformat = '%(asctime)s %(levelname)s, %(message)s' - if logfile == None: + if logfile is None: logging.basicConfig(format=logformat) else: logging.basicConfig(format=logformat, filename=logfile) @@ -497,7 +497,7 @@ Sec-WebSocket-Accept: %s\r frame = self.decode_hybi(buf, base64=self.base64) #print("Received buf: %s, frame: %s" % (repr(buf), frame)) - if frame['payload'] == None: + if frame['payload'] is None: # Incomplete/partial frame self.traffic("}.") if frame['left'] > 0: diff --git a/websockify b/websockify index a40ba55..dcbe2e6 100755 --- a/websockify +++ b/websockify @@ -177,7 +177,7 @@ Traffic Legend: '4': logging.INFO, '5': logging.DEBUG, } - if int(self.loglevel) > 5: self.loglevel = 5 + if int(self.loglevel) > 5: self.loglevel = '5' logformat = '%(asctime)s %(levelname)s, %(message)s' if self.logfile is None: