From fb0e34b997cd17481b49acdb97005c26d1351de5 Mon Sep 17 00:00:00 2001 From: Omer Katz Date: Sun, 26 Jan 2014 19:14:37 +0200 Subject: [PATCH] Exception handling should be compatible with python 2.7 and 3.x. --- websocket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websocket.py b/websocket.py index 70f0260..31f1732 100644 --- a/websocket.py +++ b/websocket.py @@ -861,7 +861,7 @@ class WebSocketApp(object): if data is None: break self._callback(self.on_message, data) - except Exception, e: + except Exception as e: self._callback(self.on_error, e) finally: if thread: