IMPROVED ERROR FOR USB CONNECTIONS TECNA
This commit is contained in:
parent
b0510d205a
commit
c791ba76e9
|
|
@ -51,11 +51,11 @@ class ModbusComponent(Component):
|
|||
strict=False,
|
||||
)
|
||||
if not self.client.connect():
|
||||
QMessageBox.critical(None, "ERRORE", "CONNESSIONE ASSENTE ALLA TECNA - VERIFICARE CONNESSIONE USB",)
|
||||
raise ConnectionError("device not reachable (could not connect): {} ({})".format(self.name, self.port))
|
||||
QMessageBox.critical(None, "ERRORE", f"ERRORE TECNA - VERIFICARE CONNESSIONE USB")
|
||||
exit(-1)
|
||||
#raise ConnectionError("device not reachable (could not connect): {} ({})".format(self.name, self.port))
|
||||
|
||||
if not self.client.is_socket_open():
|
||||
QMessageBox.critical(None, "ERRORE", "CONNESSIONE ASSENTE ALLA TECNA - VERIFICARE CONNESSIONE USB",)
|
||||
raise ConnectionError("device not reachable (socket not open): {} ({})".format(self.name, self.port))
|
||||
self.lock.unlock()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user