##// END OF EJS Templates
util: check if re2 works before using it (issue 3964)
Simon Heimberg -
r19461:dd7c992d default
parent child Browse files
Show More
@@ -673,8 +673,8 b' def compilere(pat, flags=0):'
673 global _re2
673 global _re2
674 if _re2 is None:
674 if _re2 is None:
675 try:
675 try:
676 re2.compile
676 # check if match works, see issue3964
677 _re2 = True
677 _re2 = bool(re2.match(r'\[([^\[]+)\]', '[ui]'))
678 except ImportError:
678 except ImportError:
679 _re2 = False
679 _re2 = False
680 if _re2 and (flags & ~(re.IGNORECASE | re.MULTILINE)) == 0:
680 if _re2 and (flags & ~(re.IGNORECASE | re.MULTILINE)) == 0:
General Comments 0
You need to be logged in to leave comments. Login now