windows serial is different, so disable the file check

This commit is contained in:
HappyZ 2018-11-23 16:23:04 -06:00
parent 3f0359a396
commit e07e355614
1 changed files with 4 additions and 3 deletions

View File

@ -527,9 +527,10 @@ def diagnosis_mode(dpt):
ttyName = input('>>> Enter the serial port [/dev/tty.usbmodem01]: ')
if ttyName == "":
ttyName = "/dev/tty.usbmodem01"
if not os.path.exists(ttyName):
dpt.err_print('serial `{}` not exists!'.format(ttyName))
return False
# disable file check here since Windows is different
# if not os.path.exists(ttyName):
# dpt.err_print('serial `{}` not exists!'.format(ttyName))
# return False
except BaseException as e:
dpt.err_print(str(e))
return False