Skip to content

Commit

Permalink
tools/mpremote: Fix exec_ -> exec in commands.py.
Browse files Browse the repository at this point in the history
This was missed in the pyboard refactor and is preventing `cp -r` from
working.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
  • Loading branch information
jimmo committed Jun 9, 2023
1 parent f01d5fb commit b4de697
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/mpremote/mpremote/commands.py
Expand Up @@ -137,13 +137,13 @@ def _list_recursive(files, path):
raise CommandError("'cp -r' source files must be local")
_list_recursive(src_files, path)
known_dirs = {""}
state.transport.exec_("import os")
state.transport.exec("import os")
for dir, file in src_files:
dir_parts = dir.split("/")
for i in range(len(dir_parts)):
d = "/".join(dir_parts[: i + 1])
if d not in known_dirs:
state.transport.exec_(
state.transport.exec(
"try:\n os.mkdir('%s')\nexcept OSError as e:\n print(e)" % d
)
known_dirs.add(d)
Expand Down

0 comments on commit b4de697

Please sign in to comment.