Permalink
Browse files

Fixed an `except` statement to be Python3-compatible. Thanks to chare…

…ttes for the tip.
  • Loading branch information...
1 parent 4ceb9db commit 2b6644388f1a33f0b2eeb1c7a576fc04cfa72e0a @jphalip jphalip committed Jul 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/core/urlresolvers.py
@@ -165,7 +165,7 @@ def regex(self):
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)))

0 comments on commit 2b66443

Please sign in to comment.