[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7018 - trunk/gnue-common/src/apps
From: |
reinhard |
Subject: |
[gnue] r7018 - trunk/gnue-common/src/apps |
Date: |
Sat, 12 Feb 2005 17:29:37 -0600 (CST) |
Author: reinhard
Date: 2005-02-12 17:29:37 -0600 (Sat, 12 Feb 2005)
New Revision: 7018
Modified:
trunk/gnue-common/src/apps/GConfig.py
Log:
Fixed reading gConfigDict when section is not present.
Modified: trunk/gnue-common/src/apps/GConfig.py
===================================================================
--- trunk/gnue-common/src/apps/GConfig.py 2005-02-12 22:45:04 UTC (rev
7017)
+++ trunk/gnue-common/src/apps/GConfig.py 2005-02-12 23:29:37 UTC (rev
7018)
@@ -167,12 +167,15 @@
if not configFilename: configFilename = self._defaultConfigFilename
if not section: section = self._defaultSection
- options = {}
- for option in self._loadedConfigs[configFilename].options(section):
- options[option] =
self._loadedConfigs[configFilename].get(section,string.lower(option))
+ c = self._loadedConfigs[configFilename]
+ if c.has_section(section):
+ options = {}
+ for option in c.options(section):
+ options[option] = c.get(section,string.lower(option))
+ return options
+ else:
+ return {}
- return options
-
def _buildDefaults(self, defaultDefinitions):
defaults = {}
if defaultDefinitions:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7018 - trunk/gnue-common/src/apps,
reinhard <=