diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-09-26 15:07:11 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-09-26 15:07:11 +0200 |
| commit | bb7da7844ff9f11286509c22a2549bbd4553d58d (patch) | |
| tree | 157b402708bfe1fbb4db9e78ac5035c9e164d6aa /django | |
| parent | 2c8267bf3db608b99c04ae903c424b60cafaaf93 (diff) | |
Fixed #18845 -- Do not swallow AttributeErrors when running commands
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/management/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py index b40570efc9..c61ab2b663 100644 --- a/django/core/management/__init__.py +++ b/django/core/management/__init__.py @@ -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. |
