1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #18845 -- Do not swallow AttributeErrors when running commands

This commit is contained in:
Claude Paroz
2012-09-26 15:07:11 +02:00
parent 2c8267bf3d
commit bb7da7844f
2 changed files with 21 additions and 6 deletions

View File

@@ -103,10 +103,12 @@ def get_commands():
_commands = dict([(name, 'django.core') for name in find_commands(__path__[0])])
# Find the installed apps
from django.conf import settings
try:
from django.conf import settings
apps = settings.INSTALLED_APPS
except (AttributeError, ImproperlyConfigured):
except ImproperlyConfigured:
# Still useful for commands that do not require functional settings,
# like startproject or help
apps = []
# Find and load the management module for each installed app.