mirror of
https://github.com/meshtastic/python.git
synced 2025-12-31 03:47:55 -05:00
Merge pull request #477 from TimothyHarder/hardertimothy/issue-366
Issue #366 TCP connection error handling
This commit is contained in:
@@ -948,9 +948,14 @@ def common():
|
||||
if args.ble:
|
||||
client = BLEInterface(args.ble, debugOut=logfile, noProto=args.noproto)
|
||||
elif args.host:
|
||||
client = meshtastic.tcp_interface.TCPInterface(
|
||||
args.host, debugOut=logfile, noProto=args.noproto
|
||||
)
|
||||
try:
|
||||
client = meshtastic.tcp_interface.TCPInterface(
|
||||
args.host, debugOut=logfile, noProto=args.noproto
|
||||
)
|
||||
except Exception as ex:
|
||||
meshtastic.util.our_exit(
|
||||
f"Error connecting to {args.host}:{ex}", 1
|
||||
)
|
||||
else:
|
||||
try:
|
||||
client = meshtastic.serial_interface.SerialInterface(
|
||||
|
||||
Reference in New Issue
Block a user