Skip to content
Snippets Groups Projects
Commit b870a29f authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

do not consider passwords as integer

parent c78ff29c
No related branches found
No related tags found
No related merge requests found
......@@ -42,12 +42,15 @@ class OptionsParser(ConfigParser.ConfigParser):
for option in self.options(section):
value = self.get(section, option, 1)
#convert to int options than can be
try:
i = string.atoi(value)
except ValueError:
self.tab[section][option] = value
if string.find(option, 'password') == -1:
try:
i = string.atoi(value)
except ValueError:
self.tab[section][option] = value
else:
self.tab[section][option] = i
else:
self.tab[section][option] = i
self.tab[section][option] = value
# setattr(self, str(section) + '_' + \
# str(option), value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment