Skip to content

Commit

Permalink
more UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gretzke committed Nov 6, 2019
1 parent 05189e5 commit a092363
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plug_py/plug.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ def run(self):
s.bind(('', PORT))
data, addr = s.recvfrom(1024) # wait for a packet
s.close()
if data.decode('utf-8') == ID:
received_data = data.decode('utf-8')
if received_data == ID:
self.IP = 'ws://' + addr[0] + ':1337'
window.ui.startButton.setVisible(False)
self.loop = asyncio.new_event_loop()
Expand All @@ -348,7 +349,8 @@ def run(self):
else:
window.updateInfo('No smart socket found')
except:
window.updateInfo('No smart socket found')
window.updateInfo('Error in connecting to smart socket')
window.updateInfoCenter('')

# disconnect from websocket and display message to user
def disconnect(self, err_msg):
Expand Down

0 comments on commit a092363

Please sign in to comment.