tools/mpremote: Fix exec_ -> exec in commands.py.
This was missed in the pyboard refactor and is preventing `cp -r` from working. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
parent
f01d5fb657
commit
b4de697ad1
1 changed files with 2 additions and 2 deletions
|
|
@ -137,13 +137,13 @@ def do_filesystem(state, args):
|
||||||
raise CommandError("'cp -r' source files must be local")
|
raise CommandError("'cp -r' source files must be local")
|
||||||
_list_recursive(src_files, path)
|
_list_recursive(src_files, path)
|
||||||
known_dirs = {""}
|
known_dirs = {""}
|
||||||
state.transport.exec_("import os")
|
state.transport.exec("import os")
|
||||||
for dir, file in src_files:
|
for dir, file in src_files:
|
||||||
dir_parts = dir.split("/")
|
dir_parts = dir.split("/")
|
||||||
for i in range(len(dir_parts)):
|
for i in range(len(dir_parts)):
|
||||||
d = "/".join(dir_parts[: i + 1])
|
d = "/".join(dir_parts[: i + 1])
|
||||||
if d not in known_dirs:
|
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
|
"try:\n os.mkdir('%s')\nexcept OSError as e:\n print(e)" % d
|
||||||
)
|
)
|
||||||
known_dirs.add(d)
|
known_dirs.add(d)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue