ryantimwilson / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
572a44
From 27b42c85817e4ebf03c60492f2bf187931450b51 Mon Sep 17 00:00:00 2001
572a44
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
572a44
Date: Mon, 11 Nov 2013 19:53:59 -0500
572a44
Subject: [PATCH] systemd-python: fix booted() and add two functions to docs
572a44
572a44
For some reason sphinx doesn't want to show inherited C functions.
572a44
---
572a44
 src/python-systemd/_daemon.c       | 2 +-
572a44
 src/python-systemd/docs/daemon.rst | 2 ++
572a44
 2 files changed, 3 insertions(+), 1 deletion(-)
572a44
572a44
diff --git a/src/python-systemd/_daemon.c b/src/python-systemd/_daemon.c
572a44
index 6b84fb8..f0ab16f 100644
572a44
--- a/src/python-systemd/_daemon.c
572a44
+++ b/src/python-systemd/_daemon.c
572a44
@@ -51,7 +51,7 @@ static PyObject* booted(PyObject *self, PyObject *args) {
572a44
         assert(args == NULL);
572a44
 
572a44
         r = sd_booted();
572a44
-        if (set_error(r, NULL, NULL))
572a44
+        if (set_error(r, NULL, NULL) < 0)
572a44
                 return NULL;
572a44
 
572a44
         return PyBool_FromLong(r);
572a44
diff --git a/src/python-systemd/docs/daemon.rst b/src/python-systemd/docs/daemon.rst
572a44
index 72280ca..0ad11ed 100644
572a44
--- a/src/python-systemd/docs/daemon.rst
572a44
+++ b/src/python-systemd/docs/daemon.rst
572a44
@@ -14,3 +14,5 @@
572a44
    .. autofunction:: _is_socket_unix
572a44
    .. autofunction:: _is_socket_inet
572a44
    .. autofunction:: _is_mq
572a44
+   .. autofunction:: notify
572a44
+   .. autofunction:: booted