diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2020-12-11 11:31:10 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2020-12-11 11:31:10 +0100 |
commit | df769c2effabb62afcf9fdf02185b1dc2638818c (patch) | |
tree | f931693afb4b73f0283e8fe1c56963c027ffe525 /lisp/battery.el | |
parent | 9bfcee52c1f191706d50adc194739f642686607e (diff) |
* lisp/battery.el (battery--upower-devices): Protect the D-Bus call.
(Bug#45163)
Diffstat (limited to 'lisp/battery.el')
-rw-r--r-- | lisp/battery.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/battery.el b/lisp/battery.el index e568ab52460..f59ad124794 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -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. |