Author: adrian
Date: 2007-08-11 22:07:34 -0500 (Sat, 11 Aug 2007)
New Revision: 5861
Modified:
django/trunk/django/newforms/fields.py
Log:
Fixed #5095 -- newforms now checks for EnvironmentError when importing
settings. Thanks, SmileyChris
Modified: django/trunk/django/newforms/fields.py
===================================================================
--- django/trunk/django/newforms/fields.py 2007-08-12 03:01:37 UTC (rev
5860)
+++ django/trunk/django/newforms/fields.py 2007-08-12 03:07:34 UTC (rev
5861)
@@ -344,7 +344,7 @@
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/)'
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---