Fixed #5095 -- newforms now checks for EnvironmentError when importing settings. Thanks, SmileyChris

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-08-12 03:07:34 +00:00
parent d1bef59905
commit babf25c11c
1 changed files with 1 additions and 1 deletions

View File

@ -344,7 +344,7 @@ url_re = re.compile(
try: try:
from django.conf import settings from django.conf import settings
URL_VALIDATOR_USER_AGENT = settings.URL_VALIDATOR_USER_AGENT URL_VALIDATOR_USER_AGENT = settings.URL_VALIDATOR_USER_AGENT
except ImportError: except (ImportError, EnvironmentError):
# It's OK if Django settings aren't configured. # It's OK if Django settings aren't configured.
URL_VALIDATOR_USER_AGENT = 'Django (http://www.djangoproject.com/)' URL_VALIDATOR_USER_AGENT = 'Django (http://www.djangoproject.com/)'