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):
return self.palette
arr = array.array("B", self.palette)
if hasattr(arr, "tobytes"):
return arr.tobytes()
return arr.tostring()
return arr.tobytes()
# Declare tostring as an alias for tobytes
tostring = tobytes