Author: justi9
Date: 2009-07-21 15:11:17 -0400 (Tue, 21 Jul 2009)
New Revision: 3514
Modified:
mgmt/trunk/parsley/python/parsley/config.py
Log:
Only set the parameter value if the attribute is initialized
Modified: mgmt/trunk/parsley/python/parsley/config.py
===================================================================
--- mgmt/trunk/parsley/python/parsley/config.py 2009-07-20 19:41:30 UTC (rev 3513)
+++ mgmt/trunk/parsley/python/parsley/config.py 2009-07-21 19:11:17 UTC (rev 3514)
@@ -24,7 +24,7 @@
params = dict()
- if (conf.has_section("main")):
+ if (conf.has_section("main")):
for key, value in conf.items("main"):
params[key] = value
@@ -38,8 +38,8 @@
name = param.name.replace("-", "_")
value = param.unmarshal(svalue)
- setattr(self, name, value)
-
+ if hasattr(self, name):
+ setattr(self, name, value)
else:
log.info("Ignoring unrecognized parameter '%s'" %
sname)
Show replies by date