mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
dist/tools/bmp: fix target parsing
Either GDB or pygdbmi changed behavior to trim off whitespace following the message, resulting in the `\\n` at the end of the regex no longer matching. This replaces the `\\n` with `\s*` to match both old and new output. Fixes: https://github.com/RIOT-OS/RIOT/issues/20604
This commit is contained in:
parent
9614813ba7
commit
c56f50a2eb
2
dist/tools/bmp/bmp.py
vendored
2
dist/tools/bmp/bmp.py
vendored
@ -85,7 +85,7 @@ def detect_targets(gdbmi, res):
|
||||
while True:
|
||||
for msg in res:
|
||||
if msg['type'] == 'target':
|
||||
m = re.fullmatch(pattern=r"\s*(\d)+\s*(.*)\\n", string=msg['payload'])
|
||||
m = re.fullmatch(pattern=r"\s*(\d+)\s*(.*)\s*", string=msg['payload'])
|
||||
if m:
|
||||
targets.append(m.group(2))
|
||||
elif msg['type'] == 'result':
|
||||
|
Loading…
Reference in New Issue
Block a user