Skip to content

Commit 85e6700

Browse files
committed
Print exception if COM port open error
1 parent d38d0ef commit 85e6700

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/lcd/lcd_comm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ def openSerial(self):
8989

9090
try:
9191
self.lcd_serial = serial.Serial(self.com_port, 115200, timeout=1, rtscts=1)
92-
except:
93-
logger.error(f"Cannot open COM port {self.com_port}")
92+
except Exception as e:
93+
logger.error(f"Cannot open COM port {self.com_port}: {e}")
9494
try:
9595
sys.exit(0)
9696
except:

0 commit comments

Comments
 (0)