Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit babf25c11cc1183899c9c86113483d2fdc76f854 1 parent d1bef59
@adrianholovaty adrianholovaty authored
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/)'
Please sign in to comment.
Something went wrong with that request. Please try again.