richardphibel / rpms / systemd

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