From babf25c11cc1183899c9c86113483d2fdc76f854 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sun, 12 Aug 2007 03:07:34 +0000 Subject: [PATCH] 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 --- django/newforms/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/newforms/fields.py b/django/newforms/fields.py index e9f50ad4ec0..bb8a3dc5824 100644 --- a/django/newforms/fields.py +++ b/django/newforms/fields.py @@ -344,7 +344,7 @@ url_re = re.compile( 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/)'