[pykickstart rhel7-branch/master][PATCH] Return None for attributes if no method has been set (#1002371)
David Shea
dshea at redhat.com
Thu Aug 29 17:31:56 UTC 2013
The method proxy was returning "url" for method.method if no method had
been set, and delegating other attributes to the URL handler. Instead,
return None until one of the handlers has been selected by setting
method.method.
---
pykickstart/commands/method.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pykickstart/commands/method.py b/pykickstart/commands/method.py
index fb55f25..1e0cf90 100644
--- a/pykickstart/commands/method.py
+++ b/pykickstart/commands/method.py
@@ -44,11 +44,13 @@ class FC3_Method(KickstartCommand):
return "nfs"
else:
return getattr(self.handler.nfs, name)
- else:
+ elif self.handler.url.seen:
if name == "method":
return "url"
else:
return getattr(self.handler.url, name)
+ else:
+ return None
def __setattr__(self, name, value):
if name in self.internals:
--
1.8.3.1
More information about the anaconda-patches
mailing list