From ec0ddbf1298fa9c7222deb5019a990464827e3ef Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sat, 12 Sep 2009 00:13:14 -0500 Subject: [PATCH] Add ability to specify default values for all specs and add rel_type=default to it --- ChangeLog | 5 +++++ modules/catalyst/config.py | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4f9ac400..bc5acbc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,11 @@ # Distributed under the GPL v2 # $Id$ + 12 Sep 2009; Andrew Gaffney + modules/catalyst/config.py: + Add ability to specify default values for all specs and add + rel_type=default to it + 12 Sep 2009; Andrew Gaffney modules/catalyst/target/generic_stage.py: Set a default value for livecd/iso diff --git a/modules/catalyst/config.py b/modules/catalyst/config.py index 5a06ffe9..f2aabad4 100644 --- a/modules/catalyst/config.py +++ b/modules/catalyst/config.py @@ -135,6 +135,10 @@ class ConfigParser(ParserBase): class Spec: special_prefixes = ('boot', ) + default_values = { + # Do we really still need this? + 'rel_type': 'default' + } def __init__(self, values=None): self.values = { 'global': {} } @@ -159,7 +163,9 @@ class Spec: self.target = target def get_values(self, target=None): - tmp = self.values['global'] + tmp = {} + tmp.update(self.default_values) + tmp.update(self.values['global']) if target is None: target = self.target tmp['target'] = target -- 2.26.2