Permalink
Browse files

Fixed #5095 -- newforms now checks for EnvironmentError when importin…

…g settings. Thanks, SmileyChris

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent d1bef59 commit babf25c11cc1183899c9c86113483d2fdc76f854 @adrianholovaty adrianholovaty committed Aug 12, 2007
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/newforms/fields.py
View
2 django/newforms/fields.py
@@ -344,7 +344,7 @@ def __init__(self, max_length=None, min_length=None, *args, **kwargs):
try:
from django.conf import settings
URL_VALIDATOR_USER_AGENT = settings.URL_VALIDATOR_USER_AGENT
-except ImportError:
+except (ImportError, EnvironmentError):
# It's OK if Django settings aren't configured.
URL_VALIDATOR_USER_AGENT = 'Django (http://www.djangoproject.com/)'

0 comments on commit babf25c

Please sign in to comment.