[master 1/1] Fix a DBus InvalidProperty handling

jkonecny12 installerbot-noreply at redhat.com
Tue Sep 8 14:57:37 UTC 2015


From: Jiri Konecny <jkonecny at redhat.com>

Rawhide anaconda crashing because the new InvalidProperty exception is
now raised.

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

diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
index a9e4c78..af4d655 100644
--- a/pyanaconda/nm.py
+++ b/pyanaconda/nm.py
@@ -263,7 +263,14 @@ 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" in e.message:
+            log.debug("Ivalid property %s for device %s", prop, device)
+        else:
+            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/083b968a963dfc73f324d231321df06455373f06


More information about the anaconda-patches mailing list