diff options
Diffstat (limited to 'morphlib/morph2.py')
-rw-r--r-- | morphlib/morph2.py | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/morphlib/morph2.py b/morphlib/morph2.py index a733ce77..ec4f2e9a 100644 --- a/morphlib/morph2.py +++ b/morphlib/morph2.py @@ -169,10 +169,6 @@ class Morphology(object): self._set_default_value(self._dict, 'max-jobs', int(self['max-jobs'])) - if 'disk-size' in self: - self._set_default_value(self._dict, 'disk-size', - self._parse_size(self['disk-size'])) - for name, value in self.static_defaults[self['kind']]: if name not in self._dict: self._set_default_value(self._dict, name, value) @@ -207,17 +203,6 @@ class Morphology(object): 'deploy', dict()) - def _parse_size(self, size): - if isinstance(size, basestring): - size = size.lower() - if size.endswith('g'): - return int(size[:-1]) * 1024 ** 3 - elif size.endswith('m'): # pragma: no cover - return int(size[:-1]) * 1024 ** 2 - elif size.endswith('k'): # pragma: no cover - return int(size[:-1]) * 1024 - return int(size) # pragma: no cover - def lookup_child_by_name(self, name): '''Find child reference by its name. @@ -284,10 +269,7 @@ class Morphology(object): # Simple values. Use original value unless it has been changed from # the default in memmory. if live_dict[key] == live_dict.get('_orig_' + key, None): - if key in original_dict: - result = original_dict[key] - else: - result = None + result = original_dict.get(key, None) else: result = live_dict[key] return result |