[IMP] config: better no interpolate
This commit is contained in:
@@ -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()):
|
||||
|
||||
Reference in New Issue
Block a user