diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2009-04-08 09:34:27 +0200 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2009-04-08 09:34:27 +0200 |
commit | 3b91e4461c151526b0d02e2effaae869de33a96c (patch) | |
tree | ce415e31e2e266b0fa5e11fc61b13be2e80e9506 | |
parent | f47b027237b1081818615d18ee0475ca8a4663d3 (diff) | |
download | pyexiv2-3b91e4461c151526b0d02e2effaae869de33a96c.tar.gz |
Dictionary-like del for all tags.
-rw-r--r-- | src/pyexiv2.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/pyexiv2.py b/src/pyexiv2.py index 014b58f..782bd44 100644 --- a/src/pyexiv2.py +++ b/src/pyexiv2.py @@ -1163,8 +1163,15 @@ class ImageMetadata(object): raise NotImplementedError() def __delitem__(self, key): - # TODO - raise NotImplementedError() + """ + Delete a metadata tag with a given key. + DOCME. + """ + family = key.split('.')[0].lower() + try: + return getattr(self, '_delete_%s_tag' % family)(key) + except AttributeError: + raise KeyError(key) class Image(libexiv2python.Image): |