[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master df769c2: * lisp/battery.el (battery--upower-devices): Protect the
From: |
Michael Albinus |
Subject: |
master df769c2: * lisp/battery.el (battery--upower-devices): Protect the D-Bus call. |
Date: |
Fri, 11 Dec 2020 05:31:19 -0500 (EST) |
branch: master
commit df769c2effabb62afcf9fdf02185b1dc2638818c
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
* 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 e568ab5..f59ad12 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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master df769c2: * lisp/battery.el (battery--upower-devices): Protect the D-Bus call.,
Michael Albinus <=