File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -487,15 +487,20 @@ def get_mbed_htm(self, mount_point):
487
487
def get_mbed_htm_lines (self , mount_point ):
488
488
result = []
489
489
if mount_point :
490
- for mount_point_file in [f for f in listdir (mount_point ) if isfile (join (mount_point , f ))]:
491
- if mount_point_file .lower () == self .MBED_HTM_NAME :
492
- mbed_htm_path = os .path .join (mount_point , mount_point_file )
493
- try :
494
- with open (mbed_htm_path , 'r' ) as f :
495
- result = f .readlines ()
496
- except IOError :
497
- if self .DEBUG_FLAG :
498
- self .debug (self .get_mbed_htm_target_id .__name__ , ('Failed to open file' , mbed_htm_path ))
490
+ try :
491
+ for mount_point_file in [f for f in listdir (mount_point ) if isfile (join (mount_point , f ))]:
492
+ if mount_point_file .lower () == self .MBED_HTM_NAME :
493
+ mbed_htm_path = os .path .join (mount_point , mount_point_file )
494
+ try :
495
+ with open (mbed_htm_path , 'r' ) as f :
496
+ result = f .readlines ()
497
+ except IOError :
498
+ if self .DEBUG_FLAG :
499
+ self .debug (self .get_mbed_htm_target_id .__name__ , ('Failed to open file' , mbed_htm_path ))
500
+ except OSError :
501
+ if self .DEBUG_FLAG :
502
+ self .debug (self .get_mbed_htm_target_id .__name__ , ('Failed to list mount point' , mount_point ))
503
+
499
504
return result
500
505
501
506
def get_details_txt (self , mount_point ):
You can’t perform that action at this time.
0 commit comments