##// END OF EJS Templates
py3: make regular expressions bytes by prepending b''...
Pulkit Goyal -
r35602:6f62a1c3 default
parent child Browse files
Show More
@@ -416,7 +416,7 b' def range_header_to_tuple(range_header):'
416 if range_header is None:
416 if range_header is None:
417 return None
417 return None
418 if _rangere is None:
418 if _rangere is None:
419 _rangere = re.compile(r'^bytes=(\d{1,})-(\d*)')
419 _rangere = re.compile(br'^bytes=(\d{1,})-(\d*)')
420 match = _rangere.match(range_header)
420 match = _rangere.match(range_header)
421 if match:
421 if match:
422 tup = range_tuple_normalize(match.group(1, 2))
422 tup = range_tuple_normalize(match.group(1, 2))
@@ -100,7 +100,7 b' def wsclean(opts, text, blank=True):'
100 if blank and opts.ignoreblanklines:
100 if blank and opts.ignoreblanklines:
101 text = re.sub('\n+', '\n', text).strip('\n')
101 text = re.sub('\n+', '\n', text).strip('\n')
102 if opts.ignorewseol:
102 if opts.ignorewseol:
103 text = re.sub(r'[ \t\r\f]+\n', r'\n', text)
103 text = re.sub(br'[ \t\r\f]+\n', r'\n', text)
104 return text
104 return text
105
105
106 def splitblock(base1, lines1, base2, lines2, opts):
106 def splitblock(base1, lines1, base2, lines2, opts):
General Comments 0
You need to be logged in to leave comments. Login now