##// END OF EJS Templates
util: kill configparser wrapper
Matt Mackall -
r8181:03d93882 default
parent child Browse files
Show More
@@ -14,7 +14,7 b' platform-specific details from the core.'
14
14
15 from i18n import _
15 from i18n import _
16 import cStringIO, errno, re, shutil, sys, tempfile, traceback, error
16 import cStringIO, errno, re, shutil, sys, tempfile, traceback, error
17 import os, stat, threading, time, calendar, ConfigParser, glob, osutil
17 import os, stat, threading, time, calendar, glob, osutil
18 import imp
18 import imp
19
19
20 # Python compatibility
20 # Python compatibility
@@ -118,23 +118,6 b' extendeddateformats = defaultdateformats'
118 "%b %Y",
118 "%b %Y",
119 )
119 )
120
120
121 # differences from SafeConfigParser:
122 # - case-sensitive keys
123 # - allows values that are not strings (this means that you may not
124 # be able to save the configuration to a file)
125 class configparser(ConfigParser.SafeConfigParser):
126 def optionxform(self, optionstr):
127 return optionstr
128
129 def set(self, section, option, value):
130 return ConfigParser.ConfigParser.set(self, section, option, value)
131
132 def _interpolate(self, section, option, rawval, vars):
133 if not isinstance(rawval, basestring):
134 return rawval
135 return ConfigParser.SafeConfigParser._interpolate(self, section,
136 option, rawval, vars)
137
138 def cachefunc(func):
121 def cachefunc(func):
139 '''cache the result of function calls'''
122 '''cache the result of function calls'''
140 # XXX doesn't handle keywords args
123 # XXX doesn't handle keywords args
General Comments 0
You need to be logged in to leave comments. Login now