[network-manager-applet] vpn: gracefully print information about missing vpn plugin
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] vpn: gracefully print information about missing vpn plugin
- Date: Thu, 20 Aug 2015 10:44:28 +0000 (UTC)
commit bde917b0a6598126a508729c4a5fda0709b72303
Author: Thomas Haller <thaller redhat com>
Date: Thu Aug 20 12:28:53 2015 +0200
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.
src/connection-editor/vpn-helpers.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/connection-editor/vpn-helpers.c b/src/connection-editor/vpn-helpers.c
index 8da4b4b..4ac9cf4 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]