Skip to content

Commit

Permalink
tools/mpremote: Print a nicer error when a filesystem command fails.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Aug 26, 2022
1 parent 7d3f4b2 commit 8587071
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tools/mpremote/mpremote/main.py
Expand Up @@ -354,9 +354,13 @@ def _list_recursive(files, path):
verbose=verbose,
)
else:
pyboard.filesystem_command(
pyb, fs_args, progress_callback=show_progress_bar, verbose=verbose
)
try:
pyboard.filesystem_command(
pyb, fs_args, progress_callback=show_progress_bar, verbose=verbose
)
except OSError as er:
print(f"{_PROG}: {er}")
sys.exit(1)


def do_edit(pyb, args):
Expand Down

0 comments on commit 8587071

Please sign in to comment.