misc: update xml storage to check bytes (#36515)
This commit is contained in:
parent
90fdf2c398
commit
5f1629a898
|
@ -30,7 +30,7 @@ class XmlStorableObject(StorableObject):
|
|||
def storage_load(cls, fd):
|
||||
first_byte = fd.read(1)
|
||||
fd.seek(0)
|
||||
if first_byte == '<':
|
||||
if first_byte == b'<':
|
||||
return cls.import_from_xml(fd, include_id=True)
|
||||
else:
|
||||
return StorableObject.storage_load(fd)
|
||||
|
|
Loading…
Reference in New Issue