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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user