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:
parent
9bfcee52c1
commit
df769c2eff
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user