Handle multi-section DFU files (just takes first)

This commit is contained in:
Peter D. Gray 2018-07-13 12:37:45 -04:00
parent cd3212dbf7
commit b09d9f492b

View File

@ -166,7 +166,7 @@ def real_file_upload(fd, blksize=MAX_BLK_LEN, do_upgrade=False, do_reboot=True,
if fd.read(5) == b'DfuSe':
# expecting a DFU-wrapped file.
fd.seek(0)
offset, sz = dfu_parse(fd)
offset, sz, *_ = dfu_parse(fd)
else:
# assume raw binary
pass