py3 compat

This commit is contained in:
Kovid Goyal 2020-12-28 19:28:31 +05:30
parent 7514b58066
commit 568e9851a4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -48,7 +48,7 @@ class LRFDocument(LRFMetaFile):
self.objects = {}
self._file.seek(self.object_index_offset)
obj_array = array.array("I", self._file.read(4*4*self.number_of_objects))
if ord(array.array("i",[1]).tostring()[0:1])==0: # big-endian
if ord(array.array("i",[1]).tobytes()[0:1])==0: # big-endian
obj_array.byteswap()
for i in range(self.number_of_objects):
if not self.keep_parsing: