frontend: fix disconnect when autodetection fails
We don't know the protocol version so we can't actually disconnect, just skip it.
This commit is contained in:
parent
9900e3088d
commit
761c68e469
@ -181,7 +181,8 @@ class StcGal:
|
|||||||
except (StcFramingException, StcProtocolException) as ex:
|
except (StcFramingException, StcProtocolException) as ex:
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
print("Protocol error: %s" % ex, file=sys.stderr)
|
print("Protocol error: %s" % ex, file=sys.stderr)
|
||||||
self.protocol.disconnect()
|
if not isinstance(self.protocol, StcAutoProtocol):
|
||||||
|
self.protocol.disconnect()
|
||||||
return 1
|
return 1
|
||||||
except serial.SerialException as ex:
|
except serial.SerialException as ex:
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
Loading…
Reference in New Issue
Block a user