We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 88f9efc + 4b9472e commit 3b01ca6Copy full SHA for 3b01ca6
pisi/util.py
@@ -18,6 +18,8 @@
18
import subprocess
19
import unicodedata
20
21
+from jeepney import MessageType
22
+
23
from pisi import translate as _
24
from functools import reduce
25
@@ -981,8 +983,8 @@ def systemd_inhibit(reason: str):
981
983
# Call and receive the file descriptor
982
984
reply = conn.send_and_get_reply(msg)
985
- if isinstance(reply, DBusErrorResponse):
- ctx.ui.warning(_("Failed to acquire inhibit lock %s" % reply.error_name))
986
+ if reply.header.message_type != MessageType.method_return:
987
+ ctx.ui.warning(_("Failed to acquire inhibit lock: %s" % reply.body))
988
return None, None
989
990
# Extract the file descriptor
0 commit comments