emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/bluetooth a883d60 10/57: fixes spurious error on clean-


From: Stefan Monnier
Subject: [elpa] externals/bluetooth a883d60 10/57: fixes spurious error on clean-up
Date: Thu, 7 Nov 2019 23:28:49 -0500 (EST)

branch: externals/bluetooth
commit a883d60487d7a59254dfd37ac355e9baf23f6691
Author: Raffael Stocker <address@hidden>
Commit: Raffael Stocker <address@hidden>

    fixes spurious error on clean-up
    
    This is a work-around using `ignore-errors' around the dbus unregistering
    functions.
---
 bluetooth.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/bluetooth.el b/bluetooth.el
index 217c7e5..ccbcee1 100644
--- a/bluetooth.el
+++ b/bluetooth.el
@@ -349,9 +349,7 @@ This function only uses the first adapter reported by 
Bluez."
       (concat "[" info "] "))))
 
 (defun bluetooth--cleanup ()
-  "Clean up."
-  (setq mode-line-misc-info (cl-remove bluetooth--mode-info
-                                      mode-line-misc-info))
+  "Clean up when mode buffer is killed."
   (bluetooth--unregister-agent))
 
 ;;; This command is the main entry point.  It is meant to be called by
@@ -497,10 +495,11 @@ This function only uses the first adapter reported by 
Bluez."
 
 (defun bluetooth--unregister-agent ()
   "Unregister the pairing agent."
-  (mapc #'dbus-unregister-object bluetooth--method-objects)
-  (dbus-call-method :system bluetooth--service bluetooth--root
-                   bluetooth--agent-mngr-intf "UnregisterAgent"
-                   :object-path bluetooth--own-path))
+  (ignore-errors
+    (dbus-call-method :system bluetooth--service bluetooth--root
+                     bluetooth--agent-mngr-intf "UnregisterAgent"
+                     :object-path bluetooth--own-path)
+    (mapc #'dbus-unregister-object bluetooth--method-objects)))
 
 (provide 'bluetooth)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]