/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/globbing.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:
24
24
 
25
25
import re
26
26
 
27
 
from breezy import (
 
27
from . import (
28
28
    errors,
29
29
    lazy_regex,
30
30
    )
31
 
from breezy.trace import (
 
31
from .trace import (
32
32
    mutter,
33
33
    warning,
34
34
    )
242
242
                match = regex.match(filename)
243
243
                if match:
244
244
                    return patterns[match.lastindex -1]
245
 
        except errors.InvalidPattern, e:
 
245
        except errors.InvalidPattern as e:
246
246
            # We can't show the default e.msg to the user as thats for
247
247
            # the combined pattern we sent to regex. Instead we indicate to
248
248
            # the user that an ignore file needs fixing.
286
286
        try:
287
287
            re_obj = lazy_regex.lazy_compile(tpattern, re.UNICODE)
288
288
            re_obj.search("") # force compile
289
 
        except errors.InvalidPattern, e:
 
289
        except errors.InvalidPattern as e:
290
290
            result = False
291
291
        return result
292
292