diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2009-04-08 09:29:34 +0200 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2009-04-08 09:29:34 +0200 |
commit | f47b027237b1081818615d18ee0475ca8a4663d3 (patch) | |
tree | 342aaccf98c99e2765019a67d0839554ee898cb3 /src/pyexiv2.py | |
parent | 958ad5168aaf8b8b01c1bd664eea591818e32d04 (diff) | |
download | pyexiv2-f47b027237b1081818615d18ee0475ca8a4663d3.tar.gz |
Delete an IPTC tag.
Diffstat (limited to 'src/pyexiv2.py')
-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 |