summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 504ad94)
raw | patch | inline | side by side (parent: 504ad94)
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 434d931c1925e3e5c9c9985c9b385fc463a394ba..6464970191127820314b5b72c914fb7ba7772e3e 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);
+ PyErr_Clear();
return;
}
Py_XDECREF(mod);
snprintf(buf, size, "python.%p", callback);
+ PyErr_Clear();
}
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;
}
- /* Yes, this is actually save. To call this function the calles has to
+ /* Yes, this is actually save. To call this function the caller has to
* hold the GIL. Well, save as long as there is only one GIL anyway ... */
if (prev == NULL)
*list_head = tmp->next;