From 648086d786da876645781238c951ff6b3800c445 Mon Sep 17 00:00:00 2001 From: Olivier Tilloy Date: Fri, 27 Aug 2010 19:00:20 +0200 Subject: Swallow all warnings and error messages written by libexiv2 to stderr. --- src/exiv2wrapper_python.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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(&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", init()) .def("_setRawValue", &ExifTag::setRawValue) -- cgit