From: Michael Albinus Date: Fri, 11 Dec 2020 10:31:10 +0000 (+0100) Subject: * lisp/battery.el (battery--upower-devices): Protect the D-Bus call. X-Git-Tag: emacs-28.0.90~4793 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=df769c2effabb62afcf9fdf02185b1dc2638818c;p=emacs.git * lisp/battery.el (battery--upower-devices): Protect the D-Bus call. (Bug#45163) --- 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.