/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/lazy_regex.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
import re
30
30
 
31
 
from breezy import errors
 
31
from . import errors
32
32
 
33
33
 
34
34
class LazyRegex(object):
68
68
        """Thunk over to the original re.compile"""
69
69
        try:
70
70
            return _real_re_compile(*args, **kwargs)
71
 
        except re.error, e:
 
71
        except re.error as e:
72
72
            # raise InvalidPattern instead of re.error as this gives a
73
73
            # cleaner message to the user.
74
74
            raise errors.InvalidPattern('"' + args[0] + '" ' +str(e))