diff options
Diffstat (limited to 'src/pyexiv2.py')
-rw-r--r-- | src/pyexiv2.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pyexiv2.py b/src/pyexiv2.py index c64471a..9360b60 100644 --- a/src/pyexiv2.py +++ b/src/pyexiv2.py @@ -1022,6 +1022,17 @@ class ImageMetadata(object): self._tags['xmp'][key] = tag return tag + def get(self, key): + """ + Get a metadata tag for a given key. + DOCME + """ + family = key.split('.')[0].lower() + try: + return getattr(self, '_get_%s_tag' % family)(key) + except AttributeError: + raise KeyError(key) + class Image(libexiv2python.Image): |