[master 1/1] Fix a DBus InvalidProperty handling

jkonecny12 installerbot-noreply at redhat.com
Wed Sep 9 08:52:05 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.

Resolves: rhbz#1260239
---
 pyanaconda/nm.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
index a9e4c78..9c1ecc1 100644
--- a/pyanaconda/nm.py
+++ b/pyanaconda/nm.py
@@ -122,7 +122,8 @@ def _get_property(object_path, prop, interface_name_suffix=""):
     try:
         prop = proxy.Get('(ss)', interface_name, prop)
     except GLib.GError as e:
-        if "org.freedesktop.DBus.Error.AccessDenied" in e.message:
+        if ("org.freedesktop.DBus.Error.AccessDenied" in e.message or
+            "org.freedesktop.DBus.Error.InvalidArgs" in e.message):
             return None
         elif "org.freedesktop.DBus.Error.UnknownMethod" in e.message:
             raise UnknownMethodGetError


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


More information about the anaconda-patches mailing list