1
0
mirror of https://github.com/peterantypas/maiana.git synced 2025-05-29 13:50:29 -07:00

Fixed MAIANA Python client for Mac OS

This commit is contained in:
PETER ANTYPAS 2022-02-21 10:01:42 -08:00
parent 9e0942c814
commit fa52221e65

View File

@ -29,7 +29,8 @@ class MaianaClient:
# 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')
@ -40,7 +41,8 @@ class MaianaClient:
s = serial.Serial(port)
s.close()
result.append(port)
except (OSError, Exception):
except (OSError, Exception) as e:
print(e)
pass
return result