check if configured item is available before setting
if neither a property nor a parameter exists for a given configured item, just an attribute was created
This commit is contained in:
1 parent
4d8390c1fe
commit
d768d84ea1
1 file changed
+3
-2
+3
-2
@@ -383,11 +383,12 @@ class Module(HasAccessibles):
|
||||
try:
|
||||
# this checks also for the proper datatype
|
||||
# note: this will NOT call write_* methods!
|
||||
setattr(self, k, v)
|
||||
if hasattr(self, k):
|
||||
setattr(self, k, v)
|
||||
cfgdict.pop(k)
|
||||
except (ValueError, TypeError):
|
||||
# self.log.exception(formatExtendedStack())
|
||||
errors.append('module %s, parameter %s: %s' % (self.name, k, e))
|
||||
cfgdict.pop(k)
|
||||
|
||||
# Modify units AFTER applying the cfgdict
|
||||
for k, v in self.parameters.items():
|
||||
|
||||
Reference in new issue
Block a user