aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/exiv2wrapper_python.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/exiv2wrapper_python.cpp b/src/exiv2wrapper_python.cpp
index 441578f..d6a1425 100644
--- a/src/exiv2wrapper_python.cpp
+++ b/src/exiv2wrapper_python.cpp
@@ -45,6 +45,11 @@ BOOST_PYTHON_MODULE(libexiv2python)
register_exception_translator<Exiv2::Error>(&translateExiv2Error);
+ // Swallow all warnings and error messages written by libexiv2 to stderr
+ // (if it was compiled with DEBUG or without SUPPRESS_WARNINGS).
+ // See https://bugs.launchpad.net/pyexiv2/+bug/507620.
+ std::cerr.rdbuf(NULL);
+
class_<ExifTag>("_ExifTag", init<std::string>())
.def("_setRawValue", &ExifTag::setRawValue)