1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

* lisp/battery.el (battery--upower-devices): Protect the D-Bus call.

(Bug#45163)
This commit is contained in:
Michael Albinus 2020-12-11 11:31:10 +01:00
parent 9bfcee52c1
commit df769c2eff

View File

@ -661,10 +661,12 @@ Intended as a UPower PropertiesChanged signal handler."
(cond ((stringp battery-upower-device)
(list battery-upower-device))
(battery-upower-device)
((dbus-call-method :system battery-upower-service
battery-upower-path
battery-upower-interface
"EnumerateDevices"))))
((dbus-ignore-errors
(dbus-call-method :system battery-upower-service
battery-upower-path
battery-upower-interface
"EnumerateDevices"
:timeout 1000)))))
(defun battery--upower-state (props state)
"Merge the UPower battery state in PROPS with STATE.