codecoup / auto-pts

The Bluetooth PTS automation framework
GNU General Public License v2.0
0 stars 2 forks source link

Fix error message when board is not found #38

Open michal-narajowski opened 3 years ago

michal-narajowski commented 3 years ago

This should be handled gracefully with an informative error message instead of:

ERROR:root:invalid literal for int() with base 10: 'CM0'
Traceback (most recent call last):
  File "/home/michaln/Workspace/auto-pts/autoptsclient_common.py", line 1159, in start
    return self.main(args)
  File "/home/michaln/Workspace/auto-pts/autoptsclient_common.py", line 1178, in main
    self.args = self.parse_args(_args)
  File "/home/michaln/Workspace/auto-pts/autoptsclient_common.py", line 1223, in parse_args
    self.check_args(args)
  File "/home/michaln/Workspace/auto-pts/autoptsclient_common.py", line 1264, in check_args
    not os.path.exists('COM' + str(int(tty_file["/dev/ttyS".__len__():]) + 1)):
ValueError: invalid literal for int() with base 10: 'CM0'