[master 1/1] Fix a DBus InvalidProperty handling

jkonecny12 installerbot-noreply at redhat.com
Wed Sep 9 08:03:52 UTC 2015


From: Jiri Konecny <jkonecny at redhat.com>

Rawhide anaconda starts to crashing because the new InvalidProperty
exception is now raising.

DBus API is returing exception now so we have to catch the exception
instead of only testing for empty returned variable.
---
 pyanaconda/nm.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
index a9e4c78..b98c32f 100644
--- a/pyanaconda/nm.py
+++ b/pyanaconda/nm.py
@@ -263,7 +263,12 @@ def nm_device_property(name, prop):
             raise UnknownDeviceError(name, e)
         raise
 
-    retval = _get_property(device, prop, ".Device")
+    retval = None
+    try:
+        retval = _get_property(device, prop, ".Device")
+    except GLib.GError as e:
+        if "org.freedesktop.DBus.Error.InvalidArgs" not in e.message:
+            raise
     if not retval:
         # Look in device type based interface
         interface = _device_type_specific_interface(device)


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/1b8371e637cce7a823b27798ffd69325f5349758


More information about the anaconda-patches mailing list