Tools: fix appending to bytearray in uploader.py for Python 3

This commit is contained in:
bugobliterator 2023-01-18 15:37:30 +11:00 committed by Andrew Tridgell
parent 6330c493ae
commit 434c1bb570
1 changed files with 2 additions and 2 deletions

View File

@ -175,11 +175,11 @@ class firmware(object):
self.extf_image = None
# pad image to 4-byte length
while ((len(self.image) % 4) != 0):
self.image.append('\xff')
self.image += bytes(0xFF)
# pad image to 4-byte length
if self.extf_image is not None:
while ((len(self.extf_image) % 4) != 0):
self.extf_image.append('\xff')
self.extf_image += bytes(0xFF)
def property(self, propname, default=None):
if propname in self.desc: