[IMP] config: better no interpolate

This commit is contained in:
xmo-odoo
2017-06-12 11:02:36 +02:00
committed by GitHub
parent 78dc8f6871
commit ed4a899254
+2 -4
View File
@@ -3,10 +3,8 @@
try:
import configparser as ConfigParser
CP_kw = dict(interpolation=None)
except ImportError:
import ConfigParser
CP_kw = dict()
import optparse
import os
@@ -503,7 +501,7 @@ class configmanager(object):
setattr(parser.values, option.dest, ",".join(ad_paths))
def load(self):
p = ConfigParser.ConfigParser(**CP_kw)
p = ConfigParser.RawConfigParser()
try:
p.read([self.rcfile])
for (name,value) in p.items('options'):
@@ -529,7 +527,7 @@ class configmanager(object):
pass
def save(self):
p = ConfigParser.ConfigParser(**CP_kw)
p = ConfigParser.RawConfigParser()
loglevelnames = dict(zip(self._LOGLEVELS.values(), self._LOGLEVELS.keys()))
p.add_section('options')
for opt in sorted(self.options.keys()):