eric6/MicroPython/CircuitPythonDevices.py

branch
micropython
changeset 7065
e3d04faced34
parent 7059
a8fad276cbd5
child 7082
ec199ef0cfc6
equal deleted inserted replaced
7062:ac12da95958b 7065:e3d04faced34
130 # with SEM_FAILCRITICALERRORS (1) prevents this popup. 130 # with SEM_FAILCRITICALERRORS (1) prevents this popup.
131 # 131 #
132 oldMode = ctypes.windll.kernel32.SetErrorMode(1) 132 oldMode = ctypes.windll.kernel32.SetErrorMode(1)
133 try: 133 try:
134 for disk in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ': 134 for disk in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ':
135 path = '{}:\\'.format(disk) 135 path = '{0}:\\'.format(disk)
136 if (os.path.exists(path) and 136 if (os.path.exists(path) and
137 getVolumeName(path) == 'CIRCUITPY'): 137 getVolumeName(path) == 'CIRCUITPY'):
138 return path 138 return path
139 finally: 139 finally:
140 ctypes.windll.kernel32.SetErrorMode(oldMode) 140 ctypes.windll.kernel32.SetErrorMode(oldMode)

eric ide

mercurial