From df769c2effabb62afcf9fdf02185b1dc2638818c Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 11 Dec 2020 11:31:10 +0100 Subject: [PATCH] * lisp/battery.el (battery--upower-devices): Protect the D-Bus call. (Bug#45163) --- lisp/battery.el | 10 ++++++---- 1 file 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. -- 2.39.2