Skip to content

Commit e7839f1

Browse files
authored
Prevent detect_targets.py tool script from crashing on known targets
As mut['mcu'] can be "None" on unknown targets, the detect_targets script crashes when one of these boards is connected. This happens when "mbed-cli detect -vv" is ran when a STEVAL-3DP001V1 board is connected. Which does not provide a html file with a target_id, and thus cannot be looked up in the mbedls platform database. http://www.st.com/en/evaluation-tools/steval-3dp001v1.html
1 parent b8d2180 commit e7839f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/detect_targets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def main():
7979

8080
count = 0
8181
for mut in muts.values():
82-
if re.match(mcu_filter, mut['mcu']):
82+
if re.match(mcu_filter, mut['mcu'] or "Unknown"):
8383
interface_version = get_interface_version(mut['disk'])
8484
print ""
8585
print "[mbed] Detected %s, port %s, mounted %s, interface version %s:" % \

0 commit comments

Comments
 (0)