arm_pack_manager - Update find parts for new flash alogrithm api

pull/2708/head
Jimmy Brisson 2016-07-05 13:45:39 -05:00 committed by Sarah Marsh
parent ece1de343b
commit b840a1b58f
1 changed files with 3 additions and 3 deletions

View File

@ -132,9 +132,9 @@ def command_dump_parts (cache, out, parts) :
index.update(dict(cache.find_device(part)))
for n, p in index.iteritems() :
try :
if not exists(join(out, dirname(p['algorithm']))) :
makedirs(join(out, dirname(p['algorithm'])))
with open(join(out, p['algorithm']), "wb+") as fd :
if not exists(join(out, dirname(p['algorithm']['file']))) :
makedirs(join(out, dirname(p['algorithm']['file'])))
with open(join(out, p['algorithm']['file']), "wb+") as fd :
fd.write(cache.get_flash_algorthim_binary(n).read())
except KeyError:
print("[Warning] {} does not have an associated flashing algorithm".format(n))