Commit c242aae8 authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

Fix flake8 invalid escape sequence

parent d2b673a15823
......@@ -119,7 +119,7 @@ def parse_links(link_header):
links = MultiDict()
for link_value in _split_unquotted(',', link_header):
# link_value looks like '<THE_HREF>; parm="val1 val2"; parm=val3; parm4'
href, params = re.search('^\s*<([^>]+)>\s*;(.*)$', link_value).groups()
href, params = re.search(r'^\s*<([^>]+)>\s*;(.*)$', link_value).groups()
link = {'href': href}
for param in _split_unquotted(';', params):
param = param.strip()
......
......@@ -57,10 +57,10 @@ def _parse_webtest_testresponse(string):
break
else:
raise ParseError('not a webtest.TestResponse string')
if not re.match('Response: \d{3} \w+', status):
if not re.match(r'Response: \d{3} \w+', status):
raise ParseError('not a webtest.TestResponse string')
headers = []
while re.match('[a-zA-Z\-]+: [^\n]+\n', rest):
while re.match(r'[a-zA-Z\-]+: [^\n]+\n', rest):
header, rest = rest.split('\n', 1)
name, value = header.split(':', 1)
headers.append((name.strip(), value.strip()))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment