##// END OF EJS Templates
grep: only catch re.error when compiling regular expressions
Brodie Rao -
r12385:9a93f4fb stable
parent child Browse files
Show More
@@ -1569,7 +1569,7 b' def grep(ui, repo, pattern, *pats, **opt'
1569 reflags |= re.I
1569 reflags |= re.I
1570 try:
1570 try:
1571 regexp = re.compile(pattern, reflags)
1571 regexp = re.compile(pattern, reflags)
1572 except Exception, inst:
1572 except re.error, inst:
1573 ui.warn(_("grep: invalid match pattern: %s\n") % inst)
1573 ui.warn(_("grep: invalid match pattern: %s\n") % inst)
1574 return 1
1574 return 1
1575 sep, eol = ':', '\n'
1575 sep, eol = ':', '\n'
General Comments 0
You need to be logged in to leave comments. Login now