Philipp Hörist pushed to branch master at gajim / gajim


Commits:
1d024004 by Philipp Hörist at 2025-10-30T20:46:54+01:00
imprv: Application: Improve error text on DBus register errors

- - - - -


1 changed file:

- gajim/gtk/application.py


Changes:

=====================================
gajim/gtk/application.py
=====================================
@@ -361,7 +361,18 @@ def _handle_local_options(
 
         GLib.set_application_name(application_name)
 
-        self.register()
+        try:
+            self.register()
+        except GLib.Error as error:
+            quark = GLib.quark_try_string("g-io-error-quark")
+            if error.matches(quark, Gio.IOErrorEnum.TIMED_OUT):
+                sys.exit(
+                    "Timeout reached for registering the application on DBus, "
+                    "check if there is another broken Gajim process"
+                )
+            else:
+                sys.exit(f"Unable to register application on DBus: {error}")
+
         if self.get_is_remote():
             print(
                 "Gajim is already running. "



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/1d0240044fa71a88102cb189a6f431f0d3adf7be

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/1d0240044fa71a88102cb189a6f431f0d3adf7be
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to