X Tutup
Skip to content

Commit a402d08

Browse files
committed
docs: mention .process() in docstring of .fileno()
Together with the previous commit, this makes it much easier to find the right docs. Fixes systemd#48.
1 parent 42ec430 commit a402d08

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

systemd/_reader.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,10 @@ PyDoc_STRVAR(Reader_fileno__doc__,
327327
"fileno() -> int\n\n"
328328
"Get a file descriptor to poll for changes in the journal.\n"
329329
"This method invokes sd_journal_get_fd().\n"
330-
"See :manpage:`sd_journal_get_fd(3)`.");
330+
"See :manpage:`sd_journal_get_fd(3)`.\n\n"
331+
"When the file descriptor returned by this function is used a poll\n"
332+
"loop, .process() should be used to process events and reset the readability\n"
333+
"state of the file descriptor.");
331334
static PyObject* Reader_fileno(Reader *self, PyObject *args) {
332335
int fd;
333336

@@ -850,7 +853,7 @@ static PyObject* Reader_seek_monotonic(Reader *self, PyObject *args) {
850853

851854
PyDoc_STRVAR(Reader_process__doc__,
852855
"process() -> state change (integer)\n\n"
853-
"Process events and reset the readable state of the file\n"
856+
"Process events and reset the readability state of the file\n"
854857
"descriptor returned by .fileno().\n\n"
855858
"Will return constants: NOP if no change; APPEND if new\n"
856859
"entries have been added to the end of the journal; and\n"

0 commit comments

Comments
 (0)
X Tutup