[IMP] config: better no interpolate
This commit is contained in:
@@ -3,11 +3,10 @@
|
||||
|
||||
try:
|
||||
import configparser as ConfigParser
|
||||
CP_kw = dict(interpolation=None)
|
||||
except ImportError:
|
||||
import ConfigParser
|
||||
CP_kw = dict()
|
||||
|
||||
|
||||
import optparse
|
||||
import os
|
||||
import sys
|
||||
@@ -504,7 +503,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'):
|
||||
@@ -530,7 +529,7 @@ class configmanager(object):
|
||||
pass
|
||||
|
||||
def save(self):
|
||||
p = ConfigParser.ConfigParser(**CP_kw)
|
||||
p = ConfigParser.RawConfigParser()
|
||||
loglevelnames = dict(pycompat.izip(pycompat.values(self._LOGLEVELS), pycompat.keys(self._LOGLEVELS)))
|
||||
p.add_section('options')
|
||||
for opt in sorted(pycompat.keys(self.options)):
|
||||
|
||||
Reference in New Issue
Block a user