8000 Handled already mounted disk. (#1797) · abdukir/arduino-pico@c34e602 · GitHub
[go: up one dir, main page]

Skip to content

Commit c34e602

Browse files
authored
Handled already mounted disk. (earlephilhower#1797)
1 parent 28e2529 commit c34e602

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/uf2conv.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,11 @@ def get_drives():
279279
match = re.search(r'Mounted\s+.*\s+at\s+([^\.\r\n]*)', stdoutput)
280280
if match:
281281
drives = [match.group(1)]
282+
else:
283+
stderror = proc_out.stderr.decode("UTF-8")
284+
match = re.search(r'already mounted at\s+[`\']([^\.\r\n\'`]+)', stderror)
285+
if match:
286+
drives = [match.group(1)]
282287
except Exception as ex:
283288
print("Exception executing udisksctl. Exception: {}".format(ex))
284289
# If it fails, no problem since it was a heroic attempt

0 commit comments

Comments
 (0)
0