Skip to content

Commit

Permalink
Flake
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed May 22, 2018
1 parent df8a46a commit e164666
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flovis.py
Expand Up @@ -27,7 +27,7 @@ def on_message(ws, frame):
if msg['action'] == 'ping':
ws.send(json.dumps({'action': 'pong'}))
elif msg['action'] == 'response':
if msg['success'] == False:
if msg['success'] is False:
log('warning', 'Flovis data send failed ({}): {}'.format(msg['event_id'], msg['source']))
else:
ws.send(json.dumps({'action': 'info', 'message': "LA LA LA I'M NOT LISTENING"}))
Expand All @@ -37,6 +37,7 @@ def on_close(_ws):

try:
self.ws = websocket.WebSocketApp(self.host, on_message=on_message, on_close=on_close)

def run():
self.ws.run_forever()

Expand All @@ -57,4 +58,3 @@ def stage(self, name, site, post_id, data=None):
msg_data['data'] = data

self.ws.send(json.dumps(msg_data))

0 comments on commit e164666

Please sign in to comment.