Skip to content

Commit

Permalink
Do not attempt to decode the 2 bytes read.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasole committed Oct 25, 2023
1 parent 419f4de commit 4406e62
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions PyMca5/PyMcaIO/TiffIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
__contact__ = "[email protected]"
__license__ = "MIT"
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
__date__ = "16/12/2022"
__date__ = "25/10/2023"

import sys
import os
Expand Down Expand Up @@ -143,13 +143,13 @@ def _initInternalVariables(self, fd=None):
self.fd = fd
# read the order
fd.seek(0)
order = fd.read(2).decode()
order = fd.read(2)
if len(order):
if order == "II":
if order == b"II":
# intel, little endian
fileOrder = "little"
self._structChar = '<'
elif order == "MM":
elif order == b"MM":
# motorola, high endian
fileOrder = "big"
self._structChar = '>'
Expand Down

0 comments on commit 4406e62

Please sign in to comment.