diff --git a/idtconfig.py b/idtconfig.py index 705397c..224ad09 100755 --- a/idtconfig.py +++ b/idtconfig.py @@ -19,4 +19,5 @@ def get_images(xml: bytes): for img in std_images: if not img.get("identifier") in ddr_ids: images[int(img.get("address"), 0)] = img.text + print(images) return images diff --git a/main.py b/main.py index 2c71de5..dab2abb 100755 --- a/main.py +++ b/main.py @@ -19,7 +19,7 @@ def main(config, device, chip=""): flasher = imageflasher.ImageFlasher(chip) if device != False: # We have to check not False rather than just True, because None evaluates to False, and None should be passed intact flasher.connect_serial(device) - for addr, fil in images: + for addr, fil in images.items(): flasher.download_from_disk(os.path.join(os.path.dirname(config.path), fil.replace("/", os.path.sep)), addr) print("Flash successful!")