mirror of
https://github.com/peterantypas/maiana.git
synced 2025-05-29 05:40:15 -07:00
Fixed MAIANA Python client for Mac OS
This commit is contained in:
parent
9e0942c814
commit
fa52221e65
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user