diff options
| author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-07-13 09:00:01 -0400 |
|---|---|---|
| committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-07-13 09:00:01 -0400 |
| commit | 6f190657c0f0ec1769d0c45213796370788515db (patch) | |
| tree | 05a9e9b65627bd261bd53d12958f210a4c23c72a | |
| parent | d0ac4eaae8655dc3929438456e65430844556114 (diff) | |
| download | python-systemd-6f190657c0f0ec1769d0c45213796370788515db.tar.gz | |
Fix docstrings
| -rw-r--r-- | journald/__init__.py | 2 | ||||
| -rw-r--r-- | journald/_journald.c | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/journald/__init__.py b/journald/__init__.py index 690cf36..bcf682b 100644 --- a/journald/__init__.py +++ b/journald/__init__.py @@ -10,7 +10,7 @@ def _make_line(field, value): def send(MESSAGE, MESSAGE_ID=None, CODE_FILE=None, CODE_LINE=None, CODE_FUNC=None, **kwargs): - """Send a message to journald. + r"""Send a message to journald. >>> journald.send('Hello world') >>> journald.send('Hello, again, world', FIELD2='Greetings!') diff --git a/journald/_journald.c b/journald/_journald.c index 78d74c7..82b3b61 100644 --- a/journald/_journald.c +++ b/journald/_journald.c @@ -2,6 +2,11 @@ #define SD_JOURNAL_SUPPRESS_LOCATION #include <systemd/sd-journal.h> +PyDoc_STRVAR(journald_sendv__doc__, + "sendv('FIELD=value', 'FIELD=value', ...) -> None\n\n" + "Send an entry to journald." + ); + static PyObject * journald_sendv(PyObject *self, PyObject *args) { struct iovec *iov = NULL; @@ -75,8 +80,7 @@ out1: } static PyMethodDef methods[] = { - {"sendv", journald_sendv, METH_VARARGS, - "Send an entry to journald."}, + {"sendv", journald_sendv, METH_VARARGS, journald_sendv__doc__}, {NULL, NULL, 0, NULL} /* Sentinel */ }; |
