diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pyexiv2.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pyexiv2.py b/src/pyexiv2.py index c66c73c..014b58f 100644 --- a/src/pyexiv2.py +++ b/src/pyexiv2.py @@ -1149,8 +1149,14 @@ class ImageMetadata(object): pass def _delete_iptc_tag(self, key): - # TODO - raise NotImplementedError() + if key not in self.iptc_keys: + raise KeyError('Cannot delete an inexistent tag') + self._image.deleteIptcTag(key) + try: + del self._tags['iptc'][key] + except KeyError: + # The tag was not cached. + pass def _delete_xmp_tag(self, key): # TODO |