@@ -223,7 +223,7 @@ def _update_device_from_fs(self, device, read_details_txt):
223
223
{
224
224
'daplink' : self ._update_device_details_daplink ,
225
225
'jlink' : self ._update_device_details_jlink
226
- }[device ['device_type' ] or 'daplink' ](device , read_details_txt , directory_entries )
226
+ }[device ['device_type' ] or 'daplink' ](device , read_details_txt )
227
227
except (OSError , IOError ) as e :
228
228
logger .warning (
229
229
'Marking device with mount point "%s" as unmounted due to the '
@@ -241,14 +241,13 @@ def _detect_device_type(self, device):
241
241
return self .VENDOR_ID_DEVICE_TYPE_MAP .get (device .get ('vendor_id' ))
242
242
243
243
244
- def _update_device_details_daplink (self , device , read_details_txt , directory_entries ):
244
+ def _update_device_details_daplink (self , device , read_details_txt ):
245
245
""" Updates the daplink-specific device information based on files from its 'mount_point'
246
246
@param device Dictionary containing device information
247
247
@param read_details_txt A boolean controlling the presense of the
248
248
output dict attributes read from other files present on the 'mount_point'
249
- @param directory_entries List of directories and files on the device
250
249
"""
251
- lowercase_directory_entries = [e .lower () for e in directory_entries ]
250
+ lowercase_directory_entries = [e .lower () for e in device [ ' directory_entries' ] ]
252
251
if self .MBED_HTM_NAME .lower () in lowercase_directory_entries :
253
252
self ._update_device_from_htm (device )
254
253
elif not read_details_txt :
@@ -277,12 +276,11 @@ def _update_device_details_daplink(self, device, read_details_txt, directory_ent
277
276
else :
278
277
device ['platform_name' ] = None
279
278
280
- def _update_device_details_jlink (self , device , _ , directory_entries ):
279
+ def _update_device_details_jlink (self , device , _ ):
281
280
""" Updates the jlink-specific device information based on files from its 'mount_point'
282
281
@param device Dictionary containing device information
283
- @param directory_entries List of directories and files on the device
284
282
"""
285
- lower_case_map = {e .lower (): e for e in directory_entries }
283
+ lower_case_map = {e .lower (): e for e in device [ ' directory_entries' ] }
286
284
287
285
if 'board.html' in lower_case_map :
288
286
board_file_key = 'board.html'
0 commit comments