diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-12-02 15:27:44 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-12-02 15:27:44 +0000 |
| commit | 81832f594d7b0d3b671bf12878a77f7a34fb2f04 (patch) | |
| tree | 829dd4c63a2f44fa80ebf0588b88f0eb0578d9a8 /django/newforms/fields.py | |
| parent | 49da9ab57e61e8b6d14ea72b5256555cb5c41cb5 (diff) | |
Fixed #5743 -- Tweaked the exceptions raised when importing settings so that we
cooperate with Python's standard help() function. Patch from ionut_bizau and
Ben Slavin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6832 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/newforms/fields.py')
| -rw-r--r-- | django/newforms/fields.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/newforms/fields.py b/django/newforms/fields.py index 845fb3519a..58f65ffde5 100644 --- a/django/newforms/fields.py +++ b/django/newforms/fields.py @@ -409,7 +409,7 @@ class EmailField(RegexField): try: from django.conf import settings URL_VALIDATOR_USER_AGENT = settings.URL_VALIDATOR_USER_AGENT -except (ImportError, EnvironmentError): +except ImportError: # It's OK if Django settings aren't configured. URL_VALIDATOR_USER_AGENT = 'Django (http://www.djangoproject.com/)' |
