initial import
This commit is contained in:
20
bzr/bzr-lazy-regex.patch
Normal file
20
bzr/bzr-lazy-regex.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
diff -u bzrlib/lazy_regex.py bzrlib/lazy_regex.py
|
||||
--- bzrlib/lazy_regex.py 2017-01-15 20:36:48 +0000
|
||||
+++ bzrlib/lazy_regex.py 2017-01-30 09:08:25 +0000
|
||||
@@ -1,4 +1,4 @@
|
||||
-# Copyright (C) 2006 Canonical Ltd
|
||||
+# Copyright (C) 2006, 2008-2011, 2017 Canonical Ltd
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -133,0 +134,10 @@
|
||||
+
|
||||
+
|
||||
+# Some libraries calls re.finditer which fails it if receives a LazyRegex.
|
||||
+if getattr(re, 'finditer', False):
|
||||
+ def finditer_public(pattern, string, flags=0):
|
||||
+ if isinstance(pattern, LazyRegex):
|
||||
+ return pattern.finditer(string)
|
||||
+ else:
|
||||
+ return _real_re_compile(pattern, flags).finditer(string)
|
||||
+ re.finditer = finditer_public
|
||||
Reference in New Issue
Block a user