Skip to content

Commit 6f19065

Browse files
committed
Fix docstrings
1 parent d0ac4ea commit 6f19065

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

journald/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def _make_line(field, value):
1010
def send(MESSAGE, MESSAGE_ID=None,
1111
CODE_FILE=None, CODE_LINE=None, CODE_FUNC=None,
1212
**kwargs):
13-
"""Send a message to journald.
13+
r"""Send a message to journald.
1414
1515
>>> journald.send('Hello world')
1616
>>> journald.send('Hello, again, world', FIELD2='Greetings!')

journald/_journald.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
#define SD_JOURNAL_SUPPRESS_LOCATION
33
#include <systemd/sd-journal.h>
44

5+
PyDoc_STRVAR(journald_sendv__doc__,
6+
"sendv('FIELD=value', 'FIELD=value', ...) -> None\n\n"
7+
"Send an entry to journald."
8+
);
9+
510
static PyObject *
611
journald_sendv(PyObject *self, PyObject *args) {
712
struct iovec *iov = NULL;
@@ -75,8 +80,7 @@ journald_sendv(PyObject *self, PyObject *args) {
7580
}
7681

7782
static PyMethodDef methods[] = {
78-
{"sendv", journald_sendv, METH_VARARGS,
79-
"Send an entry to journald."},
83+
{"sendv", journald_sendv, METH_VARARGS, journald_sendv__doc__},
8084
{NULL, NULL, 0, NULL} /* Sentinel */
8185
};
8286

0 commit comments

Comments
 (0)