Fixed an `except` statement to be Python3-compatible. Thanks to charettes for the tip.

This commit is contained in:
Julien Phalip 2012-07-21 15:13:55 -07:00
parent 4ceb9db9d8
commit 2b6644388f
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ class LocaleRegexProvider(object):
regex = force_unicode(self._regex) regex = force_unicode(self._regex)
try: try:
compiled_regex = re.compile(regex, re.UNICODE) compiled_regex = re.compile(regex, re.UNICODE)
except re.error, e: except re.error as e:
raise ImproperlyConfigured( raise ImproperlyConfigured(
'"%s" is not a valid regular expression: %s' % '"%s" is not a valid regular expression: %s' %
(regex, unicode(e))) (regex, unicode(e)))