python: replace exception by warning on logging path (#44287)
This commit is contained in:
parent
8ae9d3a09b
commit
637514a874
|
@ -709,8 +709,8 @@ lasso_python_log(const char *domain, GLogLevelFlags log_level, const gchar *mess
|
||||||
char *method = NULL;
|
char *method = NULL;
|
||||||
|
|
||||||
if (! logger_object) {
|
if (! logger_object) {
|
||||||
PyErr_SetString(PyExc_RuntimeError, "neither lasso.logger nor "
|
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "neither lasso.logger nor "
|
||||||
"logging.getLogger('lasso') did return a logger");
|
"logging.getLogger('lasso') did return a logger", 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (log_level) {
|
switch (log_level) {
|
||||||
|
@ -738,7 +738,6 @@ lasso_python_log(const char *domain, GLogLevelFlags log_level, const gchar *mess
|
||||||
if (result) {
|
if (result) {
|
||||||
Py_DECREF(result);
|
Py_DECREF(result);
|
||||||
} else {
|
} else {
|
||||||
PyErr_Format(PyExc_RuntimeError, "lasso could not call method %s on its logger",
|
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "lasso could not call method %s on its logger", method);
|
||||||
method);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue