Skip to content

Commit

Permalink
Fixed MAIANA Python client for Mac OS
Browse files Browse the repository at this point in the history
  • Loading branch information
PETER ANTYPAS authored and PETER ANTYPAS committed Feb 21, 2022
1 parent 9e0942c commit fa52221
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions latest/Apps/maiana-update/maianaclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def serial_ports():
# this excludes your current terminal "/dev/tty"
ports = glob.glob('/dev/tty[A-Za-z]*')
elif sys.platform.startswith('darwin'):
ports = glob.glob('/dev/tty\..*')
ports = glob.glob('/dev/tty.*')
print(ports)
else:
raise EnvironmentError('Unsupported platform')

Expand All @@ -40,7 +41,8 @@ def serial_ports():
s = serial.Serial(port)
s.close()
result.append(port)
except (OSError, Exception):
except (OSError, Exception) as e:
print(e)
pass
return result

Expand Down

0 comments on commit fa52221

Please sign in to comment.