util.read_config_file() no longer needed; removing.
This commit is contained in:
parent
8abeaf2fb6
commit
0a7805f913
@ -352,28 +352,6 @@ def get_locale_from_request(request):
|
||||
return locale_to_lower_upper(target_lang)
|
||||
|
||||
|
||||
def read_config_file(conf_file):
|
||||
"""
|
||||
Read a paste deploy style config file and process it.
|
||||
"""
|
||||
if not os.path.exists(conf_file):
|
||||
raise IOError(
|
||||
"MEDIAGOBLIN_CONFIG not set or file does not exist")
|
||||
|
||||
parser = NicerConfigParser(conf_file)
|
||||
parser.read(conf_file)
|
||||
parser._defaults.setdefault(
|
||||
'here', os.path.dirname(os.path.abspath(conf_file)))
|
||||
parser._defaults.setdefault(
|
||||
'__file__', os.path.abspath(conf_file))
|
||||
|
||||
mgoblin_conf = dict(
|
||||
[(section_name, dict(parser.items(section_name)))
|
||||
for section_name in parser.sections()])
|
||||
|
||||
return mgoblin_conf
|
||||
|
||||
|
||||
# A super strict version of the lxml.html cleaner class
|
||||
HTML_CLEANER = Cleaner(
|
||||
scripts=True,
|
||||
|
Loading…
x
Reference in New Issue
Block a user