Skip to content

Commit 3b01ca6

Browse files
authored
Merge pull request #170 from getsolus/solbuild-jeepening
2 parents 88f9efc + 4b9472e commit 3b01ca6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pisi/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
import subprocess
1919
import unicodedata
2020

21+
from jeepney import MessageType
22+
2123
from pisi import translate as _
2224
from functools import reduce
2325

@@ -981,8 +983,8 @@ def systemd_inhibit(reason: str):
981983
# Call and receive the file descriptor
982984
reply = conn.send_and_get_reply(msg)
983985

984-
if isinstance(reply, DBusErrorResponse):
985-
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))
986988
return None, None
987989

988990
# Extract the file descriptor

0 commit comments

Comments
 (0)