summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-12-02 15:27:44 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-12-02 15:27:44 +0000
commit81832f594d7b0d3b671bf12878a77f7a34fb2f04 (patch)
tree829dd4c63a2f44fa80ebf0588b88f0eb0578d9a8 /django/core
parent49da9ab57e61e8b6d14ea72b5256555cb5c41cb5 (diff)
Fixed #5743 -- Tweaked the exceptions raised when importing settings so that we
cooperate with Python's standard help() function. Patch from ionut_bizau and Ben Slavin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6832 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core')
-rw-r--r--django/core/management/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py
index fcbc9d1110..04591479b3 100644
--- a/django/core/management/__init__.py
+++ b/django/core/management/__init__.py
@@ -84,7 +84,7 @@ def get_commands():
try:
from django.conf import settings
apps = settings.INSTALLED_APPS
- except (AttributeError, EnvironmentError):
+ except (AttributeError, ImportError):
apps = []
for app_name in apps:
@@ -99,7 +99,7 @@ def get_commands():
try:
from django.conf import settings
project_directory = setup_environ(__import__(settings.SETTINGS_MODULE))
- except (AttributeError, EnvironmentError, ImportError):
+ except (AttributeError, ImportError):
project_directory = None
if project_directory: