summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJos Verlinde <Jos.Verlinde@microsoft.com>2024-06-23 14:17:47 +0200
committerDamien George <damien@micropython.org>2024-06-28 11:07:01 +1000
commit3af1425be7a786f79fe02902ca2f6079bacde809 (patch)
tree167753cf408c9383a325f3c1b3b1f7baf0300ef2
parentb4213c9c920afb8da5d3d123b26527e26dceb877 (diff)
tools/mpremote: Fix mpremote mip install with multiple lib in sys.path.
This is a fix for an algorithmic error in mpremote mip, that throws an error due to a '\n' used in the concatenation and split when there is more than one lib path in `sys.path`. Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
-rw-r--r--tools/mpremote/mpremote/mip.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/mpremote/mpremote/mip.py b/tools/mpremote/mpremote/mip.py
index 46c9686ad..c86bf01f4 100644
--- a/tools/mpremote/mpremote/mip.py
+++ b/tools/mpremote/mpremote/mip.py
@@ -179,9 +179,9 @@ def do_mip(state, args):
if args.target is None:
state.transport.exec("import sys")
lib_paths = (
- state.transport.eval("'\\n'.join(p for p in sys.path if p.endswith('/lib'))")
+ state.transport.eval("'|'.join(p for p in sys.path if p.endswith('/lib'))")
.decode()
- .split("\n")
+ .split("|")
)
if lib_paths and lib_paths[0]:
args.target = lib_paths[0]