anitazha / rpms / systemd

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