[gnome-initial-setup/gnome-40] timezone: fix critical on startup when geoclue is disabled



commit 499718ed174612b0702acf25358e110056ffc944
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Wed May 5 09:23:36 2021 -0500

    timezone: fix critical on startup when geoclue is disabled
    
    gnome-initial-setup is crashing on startup with this error:
    
    (gnome-initial-setup:85469): InitialSetup-CRITICAL **: 09:18:43.280: Failed to connect to GeoClue2 
service: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Geolocation disabled for UID 1000
    
    g_critical is only to be used to indicate programmer error. In this
    case, it's entirely expected that we might fail to connect to geoclue,
    so even g_warning() would be too much. I've changed the error message to
    use g_info() instead, which does not print by default, though we could
    just as well get rid of it entirely.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/119>

 gnome-initial-setup/pages/timezone/gis-timezone-page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnome-initial-setup/pages/timezone/gis-timezone-page.c 
b/gnome-initial-setup/pages/timezone/gis-timezone-page.c
index e1882083..573b876b 100644
--- a/gnome-initial-setup/pages/timezone/gis-timezone-page.c
+++ b/gnome-initial-setup/pages/timezone/gis-timezone-page.c
@@ -189,7 +189,7 @@ on_geoclue_simple_ready (GObject      *source_object,
   if (local_error != NULL)
     {
       if (!g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-        g_critical ("Failed to connect to GeoClue2 service: %s", local_error->message);
+        g_info ("Failed to connect to GeoClue2 service: %s", local_error->message);
       return;
     }
 


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