diff options
Diffstat (limited to 'conf/__init__.py')
-rw-r--r-- | conf/__init__.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/conf/__init__.py b/conf/__init__.py index 83c5475f..7f6c1912 100644 --- a/conf/__init__.py +++ b/conf/__init__.py @@ -108,6 +108,13 @@ class Settings(object): raise AttributeError("%r object has no attribute %r" % (self.__class__, attr)) + def hasValue(self, attr): + """Return true if key exists + """ + if attr in self.__dict__: + return True + return False + def __setattr__(self, name, value): """Set a value """ @@ -256,6 +263,9 @@ class Settings(object): Expand VM option with given key for given number of VMs """ tmp_value = self.getValue(key) + # skip empty/not set value + if not tmp_value: + return if isinstance(tmp_value, str): scalar = True master_value = tmp_value |