1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

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
This commit is contained in:
Malcolm Tredinnick
2007-12-02 15:27:44 +00:00
parent 49da9ab57e
commit 81832f594d
4 changed files with 9 additions and 9 deletions

View File

@@ -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: