X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fpython-systemd%2Flogin.c;h=dd2edbca00598daaeb2fb2479fcab6a4e0c6138a;hb=a23873387a6e722b711092c89a08ab3f3d19361c;hp=b5cb811ec1ee46e7ca6fdcad8f4a3f18ddb9f287;hpb=04b33f69b6fba648b0d48aca03b9310b3cfdb02d;p=elogind.git diff --git a/src/python-systemd/login.c b/src/python-systemd/login.c index b5cb811ec..dd2edbca0 100644 --- a/src/python-systemd/login.c +++ b/src/python-systemd/login.c @@ -159,7 +159,7 @@ static int Monitor_init(Monitor *self, PyObject *args, PyObject *keywds) int r; static const char* const kwlist[] = {"category", NULL}; - if (!PyArg_ParseTupleAndKeywords(args, keywds, "|z", (char**) kwlist, + if (!PyArg_ParseTupleAndKeywords(args, keywds, "|z:__init__", (char**) kwlist, &category)) return -1; @@ -271,7 +271,9 @@ static PyObject* Monitor_flush(Monitor *self, PyObject *args) assert(self); assert(!args); + Py_BEGIN_ALLOW_THREADS sd_login_monitor_flush(self->monitor); + Py_END_ALLOW_THREADS Py_RETURN_NONE; }