Skip to content

Commit 32aab52

Browse files
authored
Merge pull request #146 from embeddedteam103/bugfix_no_detection_for_bad_disk_name
Small bugfix: Error on bad disk name given in htrun
2 parents 0a51605 + e2d4dad commit 32aab52

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/mbed_os_tools/test/host_tests_runner/mbed_base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ def get_remount_count(disk_path, tries=2):
8888
"""! Get the remount count from 'DETAILS.TXT' file
8989
@return Returns count, None if not-available
9090
"""
91+
92+
#In case of no disk path, nothing to do
93+
if disk_path is None:
94+
return None
95+
9196
for cur_try in range(1, tries + 1):
9297
try:
9398
files_on_disk = [x.upper() for x in os.listdir(disk_path)]

0 commit comments

Comments
 (0)