aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/ConfigParser.py
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo/ConfigParser.py')
-rw-r--r--MgaRepo/ConfigParser.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/MgaRepo/ConfigParser.py b/MgaRepo/ConfigParser.py
index 0d5624e..7fc32ac 100644
--- a/MgaRepo/ConfigParser.py
+++ b/MgaRepo/ConfigParser.py
@@ -167,7 +167,7 @@ class ConfigParser:
raise NoOptionError(option, section)
if raw:
return rawval
- return self.__interpolate(rawval, d)
+ return self.__interpolate(rawval, d, option, section)
def getall(self, section, option, raw=0, vars=None):
option = self.optionxform(option)
@@ -184,8 +184,8 @@ class ConfigParser:
return values
if vars:
d.update(vars)
- for i in len(values):
- values[i] = self.__interpolate(values[i], d)
+ for i in range(len(values)):
+ values[i] = self.__interpolate(values[i], d, option, section)
return values
def walk(self, section, option=None, raw=0, vars=None):
@@ -210,10 +210,10 @@ class ConfigParser:
for optname, value in options:
if not option or optname == option:
if not raw:
- value = self.__interpolate(value, d)
+ value = self.__interpolate(value, d, option, section)
yield (optname, value)
- def __interpolate(self, value, vars):
+ def __interpolate(self, value, vars, option, section):
rawval = value
depth = 0
while depth < 10:
@@ -233,10 +233,10 @@ class ConfigParser:
return conv(self.get(section, option))
def getint(self, section, option):
- return self.__get(section, string.atoi, option)
+ return self.__get(section, int, option)
def getfloat(self, section, option):
- return self.__get(section, string.atof, option)
+ return self.__get(section, float, option)
def getboolean(self, section, option):
states = {'1': 1, 'yes': 1, 'true': 1, 'on': 1,