Skip to content

Commit 3af1425

Browse files
Josverldpgeorge
authored andcommitted
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 <[email protected]>
1 parent b4213c9 commit 3af1425

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/mpremote/mpremote/mip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ def do_mip(state, args):
179179
if args.target is None:
180180
state.transport.exec("import sys")
181181
lib_paths = (
182-
state.transport.eval("'\\n'.join(p for p in sys.path if p.endswith('/lib'))")
182+
state.transport.eval("'|'.join(p for p in sys.path if p.endswith('/lib'))")
183183
.decode()
184-
.split("\n")
184+
.split("|")
185185
)
186186
if lib_paths and lib_paths[0]:
187187
args.target = lib_paths[0]

0 commit comments

Comments
 (0)