summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/mpremote/mpremote/commands.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/mpremote/mpremote/commands.py b/tools/mpremote/mpremote/commands.py
index ef1a7643c..de12aa0bb 100644
--- a/tools/mpremote/mpremote/commands.py
+++ b/tools/mpremote/mpremote/commands.py
@@ -137,13 +137,13 @@ def do_filesystem(state, args):
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)