projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
504ad94
)
Clean up exceptions in places where we don't care about them.
author
Sven Trenkel
<collectd@semidefinite.de>
Sun, 6 Dec 2009 18:29:17 +0000
(19:29 +0100)
committer
Sven Trenkel
<collectd@semidefinite.de>
Sun, 6 Dec 2009 18:29:17 +0000
(19:29 +0100)
src/python.c
patch
|
blob
|
history
diff --git
a/src/python.c
b/src/python.c
index
434d931
..
6464970
100644
(file)
--- a/
src/python.c
+++ b/
src/python.c
@@
-224,11
+224,13
@@
static void cpy_build_name(char *buf, size_t size, PyObject *callback, const cha
if (module != NULL) {
snprintf(buf, size, "python.%s", module);
Py_XDECREF(mod);
if (module != NULL) {
snprintf(buf, size, "python.%s", module);
Py_XDECREF(mod);
+ PyErr_Clear();
return;
}
Py_XDECREF(mod);
snprintf(buf, size, "python.%p", callback);
return;
}
Py_XDECREF(mod);
snprintf(buf, size, "python.%p", callback);
+ PyErr_Clear();
}
static void cpy_log_exception(const char *context) {
}
static void cpy_log_exception(const char *context) {
@@
-624,7
+626,7
@@
static PyObject *cpy_unregister_generic(cpy_callback_t **list_head, PyObject *ar
PyErr_Format(PyExc_RuntimeError, "Unable to unregister %s callback '%s'.", desc, name);
return NULL;
}
PyErr_Format(PyExc_RuntimeError, "Unable to unregister %s callback '%s'.", desc, name);
return NULL;
}
- /* Yes, this is actually save. To call this function the calle
s
has to
+ /* Yes, this is actually save. To call this function the calle
r
has to
* hold the GIL. Well, save as long as there is only one GIL anyway ... */
if (prev == NULL)
*list_head = tmp->next;
* hold the GIL. Well, save as long as there is only one GIL anyway ... */
if (prev == NULL)
*list_head = tmp->next;