##// END OF EJS Templates
py3: add b'' to make sure regex pattern are bytes in hgweb/webutil.py...
Pulkit Goyal -
r36201:44a519ec default
parent child Browse files
Show More
@@ -626,7 +626,7 b' def getwebsubs(repo):'
626 626 # delimiters. the replace format and flags are optional, but
627 627 # delimiters are required.
628 628 match = re.match(
629 r'^s%s(.+)(?:(?<=\\\\)|(?<!\\))%s(.*)%s([ilmsux])*$'
629 br'^s%s(.+)(?:(?<=\\\\)|(?<!\\))%s(.*)%s([ilmsux])*$'
630 630 % (delim, delim, delim), pattern)
631 631 if not match:
632 632 repo.ui.warn(_("websub: invalid pattern for %s: %s\n")
@@ -634,7 +634,7 b' def getwebsubs(repo):'
634 634 continue
635 635
636 636 # we need to unescape the delimiter for regexp and format
637 delim_re = re.compile(r'(?<!\\)\\%s' % delim)
637 delim_re = re.compile(br'(?<!\\)\\%s' % delim)
638 638 regexp = delim_re.sub(unesc, match.group(1))
639 639 format = delim_re.sub(unesc, match.group(2))
640 640
General Comments 0
You need to be logged in to leave comments. Login now