[gnome-software] fedora-tagger-usage: Check if on Fedora before checking settings
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] fedora-tagger-usage: Check if on Fedora before checking settings
- Date: Tue, 9 May 2017 21:52:43 +0000 (UTC)
commit 6e05993c983895b952149b5b00be3e51a9ed788e
Author: Robert Ancell <robert ancell canonical com>
Date: Wed May 10 09:52:26 2017 +1200
fedora-tagger-usage: Check if on Fedora before checking settings
.../gs-plugin-fedora-tagger-usage.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/plugins/fedora-tagger-usage/gs-plugin-fedora-tagger-usage.c
b/plugins/fedora-tagger-usage/gs-plugin-fedora-tagger-usage.c
index 62b73a3..29a748d 100644
--- a/plugins/fedora-tagger-usage/gs-plugin-fedora-tagger-usage.c
+++ b/plugins/fedora-tagger-usage/gs-plugin-fedora-tagger-usage.c
@@ -40,6 +40,13 @@ gs_plugin_initialize (GsPlugin *plugin)
{
g_autoptr(GSettings) settings = NULL;
+ /* check that we are running on Fedora */
+ if (!gs_plugin_check_distro_id (plugin, "fedora")) {
+ gs_plugin_set_enabled (plugin, FALSE);
+ g_debug ("disabling '%s' as we're not Fedora", gs_plugin_get_name (plugin));
+ return;
+ }
+
/* this is opt-in, and turned off by default */
settings = g_settings_new ("org.gnome.desktop.privacy");
if (!g_settings_get_boolean (settings, "send-software-usage-stats")) {
@@ -49,13 +56,6 @@ gs_plugin_initialize (GsPlugin *plugin)
return;
}
- /* check that we are running on Fedora */
- if (!gs_plugin_check_distro_id (plugin, "fedora")) {
- gs_plugin_set_enabled (plugin, FALSE);
- g_debug ("disabling '%s' as we're not Fedora", gs_plugin_get_name (plugin));
- return;
- }
-
/* after the install/remove has succeeded */
gs_plugin_add_rule (plugin, GS_PLUGIN_RULE_RUN_AFTER, "packagekit");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]