mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-03 19:33:07 +03:00
issue #2959: argh, do we really need to support Python 2.x? ;-)
This commit is contained in:
parent
51bed10d4e
commit
524addc499
|
@ -239,7 +239,10 @@ class PdfDict(UserDict):
|
||||||
try:
|
try:
|
||||||
value = self[key]
|
value = self[key]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
try:
|
||||||
value = self[key.encode("us-ascii")]
|
value = self[key.encode("us-ascii")]
|
||||||
|
except KeyError:
|
||||||
|
raise AttributeError(key)
|
||||||
if isinstance(value, bytes):
|
if isinstance(value, bytes):
|
||||||
return decode_text(value)
|
return decode_text(value)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user