mirror of
https://github.com/markqvist/Sideband.git
synced 2025-07-20 21:48:58 -04:00
Port handling
This commit is contained in:
parent
23e0e2394e
commit
4f201c5615
1 changed files with 5 additions and 0 deletions
|
@ -58,6 +58,11 @@ class MQTT():
|
|||
self.is_connected = False
|
||||
|
||||
def set_server(self, host, port):
|
||||
try:
|
||||
port = int(port)
|
||||
except:
|
||||
port = None
|
||||
|
||||
self.host = host
|
||||
self.port = port or 1883
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue