From 2b6644388f1a33f0b2eeb1c7a576fc04cfa72e0a Mon Sep 17 00:00:00 2001 From: Julien Phalip Date: Sat, 21 Jul 2012 15:13:55 -0700 Subject: [PATCH] Fixed an `except` statement to be Python3-compatible. Thanks to charettes for the tip. --- django/core/urlresolvers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py index 9745eb65b7..a5248f2a5d 100644 --- a/django/core/urlresolvers.py +++ b/django/core/urlresolvers.py @@ -165,7 +165,7 @@ class LocaleRegexProvider(object): regex = force_unicode(self._regex) try: compiled_regex = re.compile(regex, re.UNICODE) - except re.error, e: + except re.error as e: raise ImproperlyConfigured( '"%s" is not a valid regular expression: %s' % (regex, unicode(e)))