summaryrefslogtreecommitdiff
path: root/systemd/_daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'systemd/_daemon.c')
-rw-r--r--systemd/_daemon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/systemd/_daemon.c b/systemd/_daemon.c
index a041b1b..87a33f0 100644
--- a/systemd/_daemon.c
+++ b/systemd/_daemon.c
@@ -145,14 +145,14 @@ static PyObject* notify(PyObject *self, PyObject *args, PyObject *keywds) {
#ifdef HAVE_PID_NOTIFY
r = sd_pid_notify(pid, unset, msg);
#else
- PyErr_SetString(PyExc_NotImplementedError, "Compiled without support for sd_pid_notify");
+ set_error(-ENOSYS, NULL, "Compiled without support for sd_pid_notify");
return NULL;
#endif
} else {
#ifdef HAVE_PID_NOTIFY_WITH_FDS
r = sd_pid_notify_with_fds(pid, unset, msg, arr, n_fds);
#else
- PyErr_SetString(PyExc_NotImplementedError, "Compiled without support for sd_pid_notify_with_fds");
+ set_error(-ENOSYS, NULL, "Compiled without support for sd_pid_notify_with_fds");
return NULL;
#endif
}