mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -254,12 +254,7 @@ class RegexURLResolver(object): | |||||||
|         try: |         try: | ||||||
|             return self._urlconf_module |             return self._urlconf_module | ||||||
|         except AttributeError: |         except AttributeError: | ||||||
|             try: |             self._urlconf_module = __import__(self.urlconf_name, {}, {}, ['']) | ||||||
|                 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) |  | ||||||
|             return self._urlconf_module |             return self._urlconf_module | ||||||
|     urlconf_module = property(_get_urlconf_module) |     urlconf_module = property(_get_urlconf_module) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user