The branch, statusflag has been updated via 96019c8aaf5c5cf2d6587314232411b523dc73fd (commit) from 83c2ca4146e9596397bd8da95d3acf369c18b4a2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: x2gobroker/config.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) The diff of changes is: diff --git a/x2gobroker/config.py b/x2gobroker/config.py index 90adbf8..c441a12 100644 --- a/x2gobroker/config.py +++ b/x2gobroker/config.py @@ -52,10 +52,10 @@ class X2GoBrokerConfigFile(object): """ defaultValues = { - 'none': { - 'none': 'empty', - }, - } + 'DEFAULT': { + 'none': 'empty', + }, + } write_user_config = False user_config_file = None @@ -77,10 +77,10 @@ class X2GoBrokerConfigFile(object): if x2gobroker.utils._checkConfigFileDefaults(defaults): self.defaultValues = defaults - # we purposefully do not inherit the ConfigParser class + # we purposefully do not inherit the C{ConfigParser} class # here as we do not want to run into name conflicts between # X2GoBroker config file options and method / property names in - # SafeConfigParser... This is a pre-cautious approach... + # C{ConfigParser}... This is a pre-cautious approach... self.iniConfig = ConfigParser.ConfigParser(self.defaultValues) self.iniConfig.optionxform = str @@ -126,7 +126,7 @@ class X2GoBrokerConfigFile(object): """\ Stores a value for a given section and key. - This methods affects a SafeConfigParser object held in + This methods affects a ConfigParser object held in RAM. No configuration file is affected by this method. To write the configuration to disk use the L{write()} method. @@ -150,17 +150,17 @@ class X2GoBrokerConfigFile(object): def _fill_defaults(self): """\ - Fills a C{SafeConfigParser} object with the default config file - values as pre-defined in Python X2GoBroker or. This SafeConfigParser + Fills a C{ConfigParser} object with the default config file + values as pre-defined in Python X2GoBroker or. This ConfigParser object is held in RAM. No configuration file is affected by this method. """ - for section, sectionvalue in [ (key, value) for (key, value) in self.defaultValues.items() if key.upper() != 'DEFAULT' ]: - for key, value in sectionvalue.items(): + for section, sectiondict in self.defaultValues.items(): + if section != 'DEFAULT' and not self.iniConfig.has_section(section): + self.iniConfig.add_section(section) + for key, value in sectiondict.items(): if self.iniConfig.has_option(section, key): continue - if not self.iniConfig.has_section(section): - self.iniConfig.add_section(section) self._storeValue(section, key, value) def update_value(self, section, key, value): @@ -183,7 +183,7 @@ class X2GoBrokerConfigFile(object): def write(self): """\ - Write the ini file modifications (SafeConfigParser object) from RAM to disk. + Write the ini file modifications (ConfigParser object) from RAM to disk. For writing the first of the C{config_files} specified on instance construction that is writable will be used. hooks/post-receive -- x2gobroker.git (HTTP(S) Session broker for X2Go) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).