aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/exiv2wrapper.cpp1
-rw-r--r--src/pyexiv2.py11
2 files changed, 12 insertions, 0 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp
index 2aecf8d..3b1e229 100644
--- a/src/exiv2wrapper.cpp
+++ b/src/exiv2wrapper.cpp
@@ -456,6 +456,7 @@ void Image::setThumbnailFromJpegFile(const std::string path)
}
*/
+// TODO: update the errors code to reflect changes from src/error.cpp in libexiv2
void translateExiv2Error(Exiv2::Error const& error)
{
// Use the Python 'C' API to set up an exception object
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):