diff --git a/cms/djangoapps/contentstore/context_processors.py b/cms/djangoapps/contentstore/context_processors.py index 1d5ac55e48..66ba685661 100644 --- a/cms/djangoapps/contentstore/context_processors.py +++ b/cms/djangoapps/contentstore/context_processors.py @@ -1,12 +1,12 @@ import ConfigParser from django.conf import settings +config_file = open(settings.REPO_ROOT / "docs" / "config.ini") +config = ConfigParser.ConfigParser() +config.readfp(config_file) + def doc_url(request): - config_file = open(settings.REPO_ROOT / "docs" / "config.ini") - config = ConfigParser.ConfigParser() - config.readfp(config_file) - # in the future, we will detect the locale; for now, we will # hardcode en_us, since we only have English documentation locale = "en_us"