summary refs log tree commit diff
path: root/libnm
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-01-23 23:34:56 +0100
committerMichael Biebl <biebl@debian.org>2017-01-23 23:34:56 +0100
commitd462f64d6044349b0a4e3581cf2c97bbab7aec97 (patch)
tree0743acb1a191ce83b5722d77aeb896c6c0cdd952 /libnm
parent58f8be580039b0575b197b9573a1c92745d96d30 (diff)
New upstream version 1.5.91 upstream/1.5.91
Diffstat (limited to 'libnm')
-rwxr-xr-xlibnm/generate-setting-docs.py21
-rw-r--r--libnm/nm-object.c13
2 files changed, 31 insertions, 3 deletions
diff --git a/libnm/generate-setting-docs.py b/libnm/generate-setting-docs.py
index d2358d9e..e1ea9723 100755
--- a/libnm/generate-setting-docs.py
+++ b/libnm/generate-setting-docs.py
@@ -18,12 +18,29 @@
 
 from __future__ import print_function
 
+import os
 import gi
-gi.require_version('NM', '1.0')
-from gi.repository import NM, GObject
+gi.require_version('GIRepository', '2.0')
+from gi.repository import GIRepository
 import argparse, datetime, re, sys
 import xml.etree.ElementTree as ET
 
+try:
+    libs = os.environ['LD_LIBRARY_PATH'].split(':')
+    libs.reverse()
+    for lib in libs:
+        GIRepository.Repository.prepend_library_path(lib)
+except AttributeError:
+        # An old GI version, that has no prepend_library_path
+        # It's alright, it probably interprets LD_LIBRARY_PATH
+        # correctly.
+        pass
+except KeyError:
+        pass
+
+gi.require_version('NM', '1.0')
+from gi.repository import NM, GObject
+
 dbus_type_name_map = {
     'b': 'boolean',
     's': 'string',
diff --git a/libnm/nm-object.c b/libnm/nm-object.c
index a5eccbdc..6a47c659 100644
--- a/libnm/nm-object.c
+++ b/libnm/nm-object.c
@@ -596,7 +596,18 @@ handle_object_property (NMObject *self, const char *property_name, GVariant *val
 	if (!object) {
 		/* This is a server bug -- a dangling object path for an object
 		 * that does not exist. */
-		g_warning ("No object known for %s", path);
+		/* XXX: We've ignored this before and the server hits the condition
+		 * more often that it should. Given we're able to recover from
+		 * ther error, let's lower the severity of the log message to
+		 * avoid unnecessarily bothering the user. This can be removed
+		 * once the issue is fixed on the server. */
+#if NM_MORE_ASSERTS
+#define __nm_log_debug g_warning
+#else
+#define __nm_log_debug g_debug
+#endif
+		__nm_log_debug ("No object known for %s", path);
+#undef __nm_log_debug
 		return FALSE;
 	}