@@ -251,8 +251,9 @@ def get_flash_algorthim_binary(self, device_name) :
251
251
:return: A file-like object that, when read, is the ELF file that describes the flashing algorithm
252
252
:rtype: ZipExtFile
253
253
"""
254
- pack = self .pack_from_cache (self .index [device_name ])
255
- return pack .open (device ['algorithm' ]['file' ])
254
+ device = self .index [device_name ]
255
+ pack = self .pack_from_cache (device )
256
+ return pack .open (device ['algorithm' ].keys ()[0 ])
256
257
257
258
def get_svd_file (self , device_name ) :
258
259
"""Retrieve the flash algorithm file for a particular part.
@@ -264,7 +265,8 @@ def get_svd_file(self, device_name) :
264
265
:return: A file-like object that, when read, is the ELF file that describes the flashing algorithm
265
266
:rtype: ZipExtFile
266
267
"""
267
- pack = self .pack_from_cache (self .index [device_name ])
268
+ device = self .index [device_name ]
269
+ pack = self .pack_from_cache (device )
268
270
return pack .open (device ['debug' ])
269
271
270
272
def generate_index (self ) :
@@ -407,7 +409,7 @@ def pdsc_from_cache(self, url) :
407
409
with open (dest , "r" ) as fd :
408
410
return BeautifulSoup (fd , "html.parser" )
409
411
410
- def pack_from_cache (self , url ) :
412
+ def pack_from_cache (self , device ) :
411
413
"""Low level inteface for extracting a PACK file from the cache.
412
414
413
415
Assumes that the file specified is a PACK file and is in the cache.
0 commit comments