aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2010-08-27 19:00:20 +0200
committerOlivier Tilloy <olivier@tilloy.net>2010-08-27 19:00:20 +0200
commit648086d786da876645781238c951ff6b3800c445 (patch)
tree89af8f4c767ceb2119a7fb55c64f0b105fd9eae9
parent40547e5567970a7b86820a78cac90645598c6c29 (diff)
downloadpyexiv2-648086d786da876645781238c951ff6b3800c445.tar.gz
Swallow all warnings and error messages written by libexiv2 to stderr.
-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)