diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-08-28 16:14:13 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-08-28 16:14:13 +0000 |
| commit | 3d577febc72e019436be5e06b3ebb4356fb0cc05 (patch) | |
| tree | c958f2d81984ada9b783d8d99de59882fcbb5d12 | |
| parent | 1a40498da41f2547bec2a3b78db621651ff675d6 (diff) | |
Fixed #7524: allow errors raised during import of a urlconf to bubble up.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8664 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/urlresolvers.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py index f6e09c1f3e..950d387caa 100644 --- a/django/core/urlresolvers.py +++ b/django/core/urlresolvers.py @@ -254,12 +254,7 @@ class RegexURLResolver(object): try: return self._urlconf_module except AttributeError: - try: - self._urlconf_module = __import__(self.urlconf_name, {}, {}, ['']) - except Exception, e: - # Either an invalid urlconf_name, such as "foo.bar.", or some - # kind of problem during the actual import. - raise ImproperlyConfigured, "Error while importing URLconf %r: %s" % (self.urlconf_name, e) + self._urlconf_module = __import__(self.urlconf_name, {}, {}, ['']) return self._urlconf_module urlconf_module = property(_get_urlconf_module) |
