mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 14:02:51 +00:00
org-logind-dbus-session-path: Fix CI tests failure
* lisp/org-clock.el (org-logind-dbus-session-path): Do not try to use dbus when `dbus-call-method' errs. `dbus-call-method' may throw Debugger entered--Lisp error: (dbus-error "org.freedesktop.login1.NoSessionForPID" "PID 7361 does not belong to any known session") Do not try to use dbus method in such scenario. Link: https://builds.sr.ht/~bzg/job/961763
This commit is contained in:
parent
880782660a
commit
03d15dd724
|
@ -1221,11 +1221,12 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling
|
|||
(when (and (boundp 'dbus-runtime-version)
|
||||
(require 'dbus nil t)
|
||||
(member "org.freedesktop.login1" (dbus-list-activatable-names)))
|
||||
(dbus-call-method
|
||||
:system "org.freedesktop.login1"
|
||||
"/org/freedesktop/login1"
|
||||
"org.freedesktop.login1.Manager"
|
||||
"GetSessionByPID" (emacs-pid)))
|
||||
(ignore-errors
|
||||
(dbus-call-method
|
||||
:system "org.freedesktop.login1"
|
||||
"/org/freedesktop/login1"
|
||||
"org.freedesktop.login1.Manager"
|
||||
"GetSessionByPID" (emacs-pid))))
|
||||
"D-Bus session path for the elogind interface.")
|
||||
|
||||
(defun org-logind-user-idle-seconds ()
|
||||
|
|
Loading…
Reference in a new issue