archrelease: copy trunk to extra-x86_64
[arch-packages.git] / bzr / repos / extra-x86_64 / bzr-lazy-regex.patch
blob8c547e7e401394513672e03eaaacf07652f8530a
1 diff -u bzrlib/lazy_regex.py bzrlib/lazy_regex.py
2 --- bzrlib/lazy_regex.py 2017-01-15 20:36:48 +0000
3 +++ bzrlib/lazy_regex.py 2017-01-30 09:08:25 +0000
4 @@ -1,4 +1,4 @@
5 -# Copyright (C) 2006 Canonical Ltd
6 +# Copyright (C) 2006, 2008-2011, 2017 Canonical Ltd
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 @@ -133,0 +134,10 @@
13 +# Some libraries calls re.finditer which fails it if receives a LazyRegex.
14 +if getattr(re, 'finditer', False):
15 + def finditer_public(pattern, string, flags=0):
16 + if isinstance(pattern, LazyRegex):
17 + return pattern.finditer(string)
18 + else:
19 + return _real_re_compile(pattern, flags).finditer(string)
20 + re.finditer = finditer_public