From fc2b8ddcc8a0d68dcd333a77314c816469ba96af Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Wed, 17 Sep 2014 10:43:45 +0200 Subject: Fixed #23495 -- Stopped swallowing real settings import error Thanks papaloizouc for the report. --- django/conf/__init__.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'django') diff --git a/django/conf/__init__.py b/django/conf/__init__.py index 0b20d52484..695cbb9e7f 100644 --- a/django/conf/__init__.py +++ b/django/conf/__init__.py @@ -90,14 +90,7 @@ class Settings(BaseSettings): # store the settings module in case someone later cares self.SETTINGS_MODULE = settings_module - try: - mod = importlib.import_module(self.SETTINGS_MODULE) - except ImportError as e: - raise ImportError( - "Could not import settings '%s' (Is it on sys.path? Is there an " - "import error in the settings file?): %s" - % (self.SETTINGS_MODULE, e) - ) + mod = importlib.import_module(self.SETTINGS_MODULE) tuple_settings = ("INSTALLED_APPS", "TEMPLATE_DIRS", "LOCALE_PATHS") self._explicit_settings = set() -- cgit v1.3