diff options
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py index f53b22f..a023055 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -13,7 +13,7 @@ import HTMLParser import sys import traceback import collections -from websocket import create_connection +from websocket import create_connection,WebSocketConnectionClosedException # hack to make tests possible.. better way? try: @@ -1189,9 +1189,12 @@ def slack_websocket_cb(server, fd): message_json = json.loads(data) # this magic attaches json that helps find the right dest message_json['_server'] = server - except: + except WebSocketConnectionClosedException: servers.find(server).ws.close() return w.WEECHAT_RC_OK + except Exception: + dbg("socket issue: {}\n".format(traceback.format_exc())) + return w.WEECHAT_RC_OK # dispatch here if "reply_to" in message_json: function_name = "reply" |