mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2025-02-22 09:19:51 +01:00
Port handling
This commit is contained in:
parent
23e0e2394e
commit
4f201c5615
@ -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…
x
Reference in New Issue
Block a user