Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5085af7

Browse files
committed
Use explicit bytestring with struct.unpack
Apparently needed in Python 2.6.
1 parent 59deb8c commit 5085af7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/backends/backend_pdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ def _writePng(self, data):
12951295
while True:
12961296
n = buffer.readinto(header)
12971297
assert n == 8
1298-
length, type = struct.unpack('!L4s', header)
1298+
length, type = struct.unpack(b'!L4s', header)
12991299
if type == b'IDAT':
13001300
data = bytearray(length)
13011301
n = buffer.readinto(data)

0 commit comments

Comments
 (0)