mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-25 06:34:48 +03:00
py2 compatibility
This commit is contained in:
parent
49fc09d590
commit
60c5614086
|
@ -493,7 +493,7 @@ class ExifImageFileDirectory(TiffImagePlugin.ImageFileDirectory_v1):
|
|||
raise NotImplementedError()
|
||||
|
||||
def _setitem(self, tag, value, legacy_api):
|
||||
super()._setitem(tag, value, legacy_api)
|
||||
TiffImagePlugin.ImageFileDirectory_v1._setitem(self, tag, value, legacy_api)
|
||||
if legacy_api:
|
||||
val = self._tags_v1[tag]
|
||||
if not isinstance(val, (tuple, bytes)):
|
||||
|
@ -504,7 +504,7 @@ class ExifImageFileDirectory(TiffImagePlugin.ImageFileDirectory_v1):
|
|||
if isinstance(value, TiffImagePlugin.ImageFileDirectory_v2):
|
||||
self._tags_v1[tag] = value
|
||||
else:
|
||||
super().__setitem__(tag, value)
|
||||
TiffImagePlugin.ImageFileDirectory_v1.__setitem__(self, tag, value)
|
||||
|
||||
def __getitem__(self, tag):
|
||||
if tag not in self._tags_v1: # unpack on the fly
|
||||
|
@ -526,7 +526,7 @@ class ExifImageFileDirectory(TiffImagePlugin.ImageFileDirectory_v1):
|
|||
self._tagdata.update(other._tagdata)
|
||||
self.tagtype.update(other.tagtype)
|
||||
else:
|
||||
super().update(*args, **kwds)
|
||||
TiffImagePlugin.ImageFileDirectory_v1.update(self, *args, **kwds)
|
||||
|
||||
|
||||
def _getexif(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user