do not consider passwords as integer
This commit is contained in:
parent
c78ff29ce7
commit
b870a29f46
|
@ -42,12 +42,15 @@ class OptionsParser(ConfigParser.ConfigParser):
|
||||||
for option in self.options(section):
|
for option in self.options(section):
|
||||||
value = self.get(section, option, 1)
|
value = self.get(section, option, 1)
|
||||||
#convert to int options than can be
|
#convert to int options than can be
|
||||||
try:
|
if string.find(option, 'password') == -1:
|
||||||
i = string.atoi(value)
|
try:
|
||||||
except ValueError:
|
i = string.atoi(value)
|
||||||
self.tab[section][option] = value
|
except ValueError:
|
||||||
|
self.tab[section][option] = value
|
||||||
|
else:
|
||||||
|
self.tab[section][option] = i
|
||||||
else:
|
else:
|
||||||
self.tab[section][option] = i
|
self.tab[section][option] = value
|
||||||
|
|
||||||
# setattr(self, str(section) + '_' + \
|
# setattr(self, str(section) + '_' + \
|
||||||
# str(option), value)
|
# str(option), value)
|
||||||
|
|
Loading…
Reference in New Issue