summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO2
-rw-r--r--src/python-systemd/_reader.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/TODO b/TODO
index 1cc69b901a..4419582e25 100644
--- a/TODO
+++ b/TODO
@@ -570,6 +570,8 @@ Features:
- allow reading of only select fields in systemd.journal._reader.Reader
- export sd_journal_test_cursor in systemd.journal._reader.Reader
- export sd_journal_get_usage in systemd.journal._reader.Reader
+ - add systemd.journal._reader._Reader.closed attribute (it can
+ be just "return self->j != NULL")
- figure out a simple way to wait for journal events in a way that
works with ^C
diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c
index 52e6b1c7a5..160ab69a3c 100644
--- a/src/python-systemd/_reader.c
+++ b/src/python-systemd/_reader.c
@@ -171,6 +171,7 @@ PyDoc_STRVAR(Reader_close__doc__,
static PyObject* Reader_close(Reader *self, PyObject *args)
{
sd_journal_close(self->j);
+ self->j = NULL;
Py_RETURN_NONE;
}