mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-25 08:10:33 +03:00
issue #2959: oops, hopefully fix Python 2.x
This commit is contained in:
parent
53ce9ec4fb
commit
51bed10d4e
|
@ -226,7 +226,10 @@ class PdfDict(UserDict):
|
|||
|
||||
def __setattr__(self, key, value):
|
||||
if key == "data":
|
||||
UserDict.__setattr__(self, key, value)
|
||||
if hasattr(UserDict, "__setattr__"):
|
||||
UserDict.__setattr__(self, key, value)
|
||||
else:
|
||||
self.__dict__[key] = value
|
||||
else:
|
||||
if isinstance(key, str):
|
||||
key = key.encode("us-ascii")
|
||||
|
|
Loading…
Reference in New Issue
Block a user