python
python copied to clipboard
meshtastic CLI hangs on MAC
The following code on MAC Catalina 10.15.7 hangs in open. Not sure why an open() would hang - it should either open the device or return with error. Hang is not expected!
if platform.system() != 'Windows':
with open(self.devPath, encoding='utf8') as f:
attrs = termios.tcgetattr(f)
attrs[2] = attrs[2] & ~termios.HUPCL
termios.tcsetattr(f, termios.TCSAFLUSH, attrs)
f.close()
time.sleep(0.1)
(BTW: platform.system() return 'Darwin' for Catalina 10.15.7) Discovered hang using debug log print statements.