summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/core/management/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py
index b6a7d53a0c..fdbf5c26eb 100644
--- a/django/core/management/__init__.py
+++ b/django/core/management/__init__.py
@@ -262,10 +262,10 @@ class ManagementUtility(object):
# Output an extra note if settings are not properly configured
try:
settings.INSTALLED_APPS
- except ImproperlyConfigured as e:
+ except ImproperlyConfigured as err:
usage.append(style.NOTICE(
"Note that only Django core commands are listed as settings "
- "are not properly configured (error: %s)." % e))
+ "are not properly configured (error: %s)." % err))
return '\n'.join(usage)
@@ -280,6 +280,8 @@ class ManagementUtility(object):
try:
app_name = commands[subcommand]
except KeyError:
+ # This might trigger ImproperlyConfigured (masked in get_commands)
+ settings.INSTALLED_APPS
sys.stderr.write("Unknown command: %r\nType '%s help' for usage.\n" %
(subcommand, self.prog_name))
sys.exit(1)