mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 08:05:49 +08:00
Make nextion.py compatible with pyserial < v3
This commit is contained in:
@@ -111,8 +111,12 @@ if __name__ == "__main__":
|
|||||||
except serial.serialutil.SerialException:
|
except serial.serialutil.SerialException:
|
||||||
print 'could not open serial device ' + sys.argv[2]
|
print 'could not open serial device ' + sys.argv[2]
|
||||||
exit(1)
|
exit(1)
|
||||||
if not ser.is_open:
|
if (serial.VERSION <= "3.0"):
|
||||||
ser.open()
|
if not ser.isOpen():
|
||||||
|
ser.open()
|
||||||
|
else:
|
||||||
|
if not ser.is_open:
|
||||||
|
ser.open()
|
||||||
|
|
||||||
checkModel = None
|
checkModel = None
|
||||||
if len(sys.argv) == 4:
|
if len(sys.argv) == 4:
|
||||||
|
|||||||
Reference in New Issue
Block a user