Removed code from before Python 3.2

This commit is contained in:
Andrew Murray 2021-06-22 21:57:25 +10:00
parent 9192a33b38
commit 1606d9adf3

View File

@ -90,9 +90,7 @@ class ImagePalette:
if isinstance(self.palette, bytes): if isinstance(self.palette, bytes):
return self.palette return self.palette
arr = array.array("B", self.palette) arr = array.array("B", self.palette)
if hasattr(arr, "tobytes"):
return arr.tobytes() return arr.tobytes()
return arr.tostring()
# Declare tostring as an alias for tobytes # Declare tostring as an alias for tobytes
tostring = tobytes tostring = tobytes