systemd-python: fix error check in _Reader.wait()

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2013-03-05 23:23:09 -05:00
parent a187bfd98a
commit 6210afbcff

View file

@ -507,9 +507,10 @@ static PyObject* Reader_wait(Reader *self, PyObject *args, PyObject *keywds)
return NULL;
Py_BEGIN_ALLOW_THREADS
r = sd_journal_wait(self->j, timeout ==0 ? (uint64_t) -1 : timeout * 1E6);
r = sd_journal_wait(self->j,
timeout == 0 ? (uint64_t) -1 : timeout * 1E6);
Py_END_ALLOW_THREADS
if (set_error(r, NULL, NULL))
if (set_error(r, NULL, NULL) < 0)
return NULL;
return long_FromLong(r);