mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
ImageFileDirectory_v1 does not raise KeyError
This commit is contained in:
parent
f3ed44a566
commit
ef16cb8efe
|
@ -3327,19 +3327,13 @@ class Exif(MutableMapping):
|
|||
return tag in self
|
||||
|
||||
def __setitem__(self, tag, value):
|
||||
if self._info is not None:
|
||||
try:
|
||||
del self._info[tag]
|
||||
except KeyError:
|
||||
pass
|
||||
if self._info is not None and tag in self._info:
|
||||
del self._info[tag]
|
||||
self._data[tag] = value
|
||||
|
||||
def __delitem__(self, tag):
|
||||
if self._info is not None:
|
||||
try:
|
||||
del self._info[tag]
|
||||
except KeyError:
|
||||
pass
|
||||
if self._info is not None and tag in self._info:
|
||||
del self._info[tag]
|
||||
del self._data[tag]
|
||||
|
||||
def __iter__(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user