-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bluetooth: reinitialize dbus #2221
Conversation
SERVICE_UNKNOWN FOUND IT -- Something like this. |
d1fe718
to
82b7cc8
Compare
Okay, your patch almost works, but it needed this patch: diff --git a/py3status/modules/bluetooth.py b/py3status/modules/bluetooth.py
index cb9a8638..a7b36371 100644
--- a/py3status/modules/bluetooth.py
+++ b/py3status/modules/bluetooth.py
@@ -130,7 +130,7 @@ class Py3status:
self.py3.log(" --- SUCCESS ---")
except GLib.Error as err:
self.py3.log(" --- FAILED ---")
- if err.matches(Gio.io_error_quark(), Gio.DBusError.SERVICE_UNKNOWN):
+ if err.matches(Gio.dbus_error_quark(), Gio.DBusError.SERVICE_UNKNOWN):
self._dbus_init()
self.py3.log(" --- MATCHED ---")
else: If we want to match the dbus error, we must get the dbus error quark instead of io error quark |
4a489f4
to
92b76c6
Compare
Just FYI, as of now (92b76c6), the PR works for me. |
OK. The next one should be same. I think retrying loop might be unnecessary since trying it once should be enough... and if it failed for some reason, giving it some time for the next one (10s) should be more than enough. I'm guessing the EDIT: You can use this for a while... Once you confirm it's working fine, I'll squash the commit and we call it a day. |
I have tested again, and it works. I'll use this for a bit and then get back to you after a week or so to confirm that the issue didn't reappear. Thank you! |
Hi, I haven't had any problems for the past week, so I think the patch is correct. |
89407ac
to
ab6f172
Compare
Thanks! |
I wonder if it is a race condition. Untested. Trying to catch this exception.
Closes #2218.