Skip to content

Commit

Permalink
Print exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Undo1 committed Jun 10, 2016
1 parent 6fec985 commit 2f1a478
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion metasmoke.py
Expand Up @@ -5,6 +5,8 @@
from globalvars import GlobalVars
import threading
import websocket
import sys
import traceback


class Metasmoke:
Expand All @@ -21,9 +23,15 @@ def init_websocket(self):

if "message" in message:
GlobalVars.charcoal_hq.send_message("{ [metasmoke](https://github.com/Charcoal-SE/metasmoke) } " + message['message'])
except:
except Exception, e:
GlobalVars.metasmoke_ws = websocket.create_connection(GlobalVars.metasmoke_ws_host, origin=GlobalVars.metasmoke_host)
GlobalVars.metasmoke_ws.send(json.dumps({"command": "subscribe", "identifier": "{\"channel\":\"SmokeDetectorChannel\"}"}))
print e
try:
exc_info = sys.exc_info()
traceback.print_exception(*exc_info)
except:
print "meh"

@classmethod
def send_stats_on_post(self, title, link, reasons, body, username, user_link, why, owner_rep, post_score, up_vote_count, down_vote_count):
Expand Down

0 comments on commit 2f1a478

Please sign in to comment.