summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-08-20 12:28:53 +0200
committerThomas Haller <thaller@redhat.com>2015-08-20 12:44:00 +0200
commitbde917b0a6598126a508729c4a5fda0709b72303 (patch)
treeaad901106db694915b6886b060dc6df9e9a70d2b
parent9ab7065e251206f659771a14dfac767a867267fb (diff)
downloadnetwork-manager-applet-bde917b0a6598126a508729c4a5fda0709b72303.tar.gz
vpn: gracefully print information about missing vpn plugin
VPN plugins are usually split into separate package, thus it might not be an error that a .name file mentions a plugin file that does not exist (because it isn't installed). Only print an info message about this.
-rw-r--r--src/connection-editor/vpn-helpers.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/connection-editor/vpn-helpers.c b/src/connection-editor/vpn-helpers.c
index 8da4b4bc..4ac9cf47 100644
--- a/src/connection-editor/vpn-helpers.c
+++ b/src/connection-editor/vpn-helpers.c
@@ -72,11 +72,16 @@ vpn_get_plugins ()
else {
if ( !nm_vpn_plugin_info_get_plugin (plugin_info)
&& nm_vpn_plugin_info_lookup_property (plugin_info, NM_VPN_PLUGIN_INFO_KF_GROUP_GNOME, "properties")) {
- g_message ("Cannot load legacy-only plugin '%s' (%s)",
+ g_message ("vpn: (%s,%s) cannot load legacy-only plugin",
nm_vpn_plugin_info_get_name (plugin_info),
nm_vpn_plugin_info_get_filename (plugin_info));
+ } else if (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
+ g_message ("vpn: (%s,%s) file \"%s\" not found. Did you install the client package?",
+ nm_vpn_plugin_info_get_name (plugin_info),
+ nm_vpn_plugin_info_get_filename (plugin_info),
+ nm_vpn_plugin_info_get_plugin (plugin_info));
} else {
- g_warning ("Could not load '%s' plugin %s: %s",
+ g_warning ("vpn: (%s,%s) could not load plugin: %s",
nm_vpn_plugin_info_get_name (plugin_info),
nm_vpn_plugin_info_get_filename (plugin_info),
error->message);