From: Christopher Allan Webber Date: Sun, 19 Jun 2011 16:10:45 +0000 (-0500) Subject: util.read_config_file() no longer needed; removing. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0a7805f9130308e264ac0ea77c93f3554c5a66cc;p=mediagoblin.git util.read_config_file() no longer needed; removing. --- diff --git a/mediagoblin/util.py b/mediagoblin/util.py index fc380f41..865add79 100644 --- a/mediagoblin/util.py +++ b/mediagoblin/util.py @@ -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,