[binding python] prevent warning in wrapper_top.c under hardy with gcc 4.2.4

This commit is contained in:
Benjamin Dauvergne 2011-11-07 16:59:58 +01:00
parent 773cdab883
commit 0e0511c686
1 changed files with 2 additions and 1 deletions

View File

@ -606,8 +606,9 @@ static PyObject *get_logger_object() {
}
/* XXX: needed so that PyImport_ImportModule("logging") always works */
logging_module = PyImport_ImportModule("sys");
if (logging_module)
if (logging_module) {
Py_DECREF(logging_module);
}
logging_module = PyImport_ImportModule("logging");
if (logging_module) {
_logger_object = PyObject_CallMethod(logging_module, "getLogger",