Closed lasers closed 9 months ago
SERVICE_UNKNOWN
FOUND IT -- Something like this.
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
Just FYI, as of now (92b76c66a78d601161eeacd4bd1b414363693c9d), 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 post_config_hook
method isn't covered in py3status module error retries.
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.
Thanks!
I wonder if it is a race condition. Untested. Trying to catch this exception.
Closes https://github.com/ultrabug/py3status/issues/2218.