r135 - branches/rewrite/src
Nat Budin
partial-mirror-devel@lists.alioth.debian.org
Fri, 02 Jul 2004 09:34:27 -0600
Author: natbudin-guest
Date: Fri Jul 2 09:34:27 2004
New Revision: 135
Modified:
branches/rewrite/src/Config.py
Log:
dict doesn't have a method called has_option. Changed that back, left the
variables named option.
Modified: branches/rewrite/src/Config.py
==============================================================================
--- branches/rewrite/src/Config.py (original)
+++ branches/rewrite/src/Config.py Fri Jul 2 09:34:27 2004
@@ -120,12 +120,12 @@
def getOption(self, option, section='GLOBAL'):
# get a config value for a certain section. if it's not
# specified, fall back to GLOBAL
- if not self.has_option(section):
+ if not self.has_key(section):
debug("no config section called [%s]." % (section))
raise InvalidSection(section)
- if self[section].has_option(option):
+ if self[section].has_key(option):
return self[section][option]
- if not self['GLOBAL'].has_option(option):
+ if not self['GLOBAL'].has_key(option):
debug("[%s] is not present in section [%s] nor the global section of config file." % (option, section))
raise InvalidOption(section, option)
return self['GLOBAL'][option]