diff options
| author | Julien Phalip <jphalip@gmail.com> | 2012-07-21 15:13:55 -0700 |
|---|---|---|
| committer | Julien Phalip <jphalip@gmail.com> | 2012-07-21 15:13:55 -0700 |
| commit | 2b6644388f1a33f0b2eeb1c7a576fc04cfa72e0a (patch) | |
| tree | e9edb8d9a58cb80d2bb9db0afd5988750a3c0af9 | |
| parent | 4ceb9db9d849905720a1c958a5f8629753ef6604 (diff) | |
Fixed an `except` statement to be Python3-compatible. Thanks to charettes for the tip.
| -rw-r--r-- | django/core/urlresolvers.py | 2 |
1 files changed, 1 insertions, 1 deletions
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))) |
