0004-python-replace-exception-by-warning-on-logging-path-.patch
bindings/python/wrapper_top.c | ||
---|---|---|
709 | 709 |
char *method = NULL; |
710 | 710 | |
711 | 711 |
if (! logger_object) { |
712 |
PyErr_SetString(PyExc_RuntimeError, "neither lasso.logger nor "
|
|
713 |
"logging.getLogger('lasso') did return a logger");
|
|
712 |
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "neither lasso.logger nor "
|
|
713 |
"logging.getLogger('lasso') did return a logger", 1);
|
|
714 | 714 |
return; |
715 | 715 |
} |
716 | 716 |
switch (log_level) { |
... | ... | |
738 | 738 |
if (result) { |
739 | 739 |
Py_DECREF(result); |
740 | 740 |
} else { |
741 |
PyErr_Format(PyExc_RuntimeError, "lasso could not call method %s on its logger", |
|
742 |
method); |
|
741 |
PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "lasso could not call method %s on its logger", method); |
|
743 | 742 |
} |
744 | 743 |
} |
745 |
- |