Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored August 12, 2007

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/newforms/fields.py
2  django/newforms/fields.py
@@ -344,7 +344,7 @@ def __init__(self, max_length=None, min_length=None, *args, **kwargs):
344 344
 try:
345 345
     from django.conf import settings
346 346
     URL_VALIDATOR_USER_AGENT = settings.URL_VALIDATOR_USER_AGENT
347  
-except ImportError:
  347
+except (ImportError, EnvironmentError):
348 348
     # It's OK if Django settings aren't configured.
349 349
     URL_VALIDATOR_USER_AGENT = 'Django (http://www.djangoproject.com/)'
350 350
 

0 notes on commit babf25c

Please sign in to comment.
Something went wrong with that request. Please try again.