Update xml_lib.py
Some checks failed
Python application / Test (push) Has been cancelled

This commit is contained in:
Bjoern Kerler 2024-10-07 10:46:03 +02:00 committed by GitHub
parent 7b30c5293c
commit 127c353b39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -967,7 +967,10 @@ class DAXML(metaclass=LogBase):
self.ack_value(length)
cmd, result = self.get_command_result()
if type(result) is DwnFile:
data = fh.read(length)
if fh:
data = fh.read(length)
else:
data = wdata
if not self.upload(result, data, raw=True):
self.error("Error on writing flash at 0x%08X" % addr)
return False