tools/mpremote: Print a nicer error when a filesystem command fails.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2022-08-23 17:05:30 +10:00
parent 7d3f4b23dc
commit 858707181d
1 changed files with 7 additions and 3 deletions

View File

@ -354,9 +354,13 @@ def do_filesystem(pyb, args):
verbose=verbose, verbose=verbose,
) )
else: else:
pyboard.filesystem_command( try:
pyb, fs_args, progress_callback=show_progress_bar, verbose=verbose 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): def do_edit(pyb, args):