aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2015-06-07 11:59:34 +0200
committerMarius Halden <marius.h@lden.org>2015-06-07 11:59:34 +0200
commit2f897d69dddbb1177aa78159c9d87759845ad870 (patch)
tree7a357704662b99d38ba105df5c8c38f471a41b6a
parent63cf0f3a66950d1a653303d43b74946744a582b1 (diff)
downloadpush-client-2f897d69dddbb1177aa78159c9d87759845ad870.tar.gz
push-client-2f897d69dddbb1177aa78159c9d87759845ad870.tar.bz2
push-client-2f897d69dddbb1177aa78159c9d87759845ad870.tar.xz
Some debugging stuff
-rwxr-xr-xpush.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/push.py b/push.py
index c09db69..ef0f1ee 100755
--- a/push.py
+++ b/push.py
@@ -38,12 +38,15 @@ class WebSocketClient(ws4py.client.WebSocketBaseClient):
msg_handler = MessageHandler(self.cfg)
msg_handler.handle_messages()
elif msg == 'R': # Restart
+ debug("Received restart command.")
raise WebSocketRestart()
elif msg == 'E': # Error - Requires manual reconnect
+ debug("Received error command.")
raise WebSocketError()
elif msg == '#': # Keep-alive packet
pass
else: # Ignore unknown commands
+ debug("Received unknown command \"%s\"." % msg)
pass
def closed(self, code, reason=None):