test/contrib: Fix invalid escapes in regex strings

Flagged by flake8 v3.6.0, as W605, plus a few others identified
incidentally, e.g. 59ffecf66cf4d08c4b431e457b083878d66a3fd6.

Note that r"\n" matches to "\n" under re.match/search.
This commit is contained in:
Ben Woosley
2019-02-01 17:00:02 -08:00
parent 6e431296da
commit b21680baf5
14 changed files with 38 additions and 41 deletions

View File

@ -765,8 +765,8 @@ if config.dmg is not None:
output = runHDIUtil("attach", dmg_name + ".temp", readwrite=True, noverify=True, noautoopen=True, capture_stdout=True)
except subprocess.CalledProcessError as e:
sys.exit(e.returncode)
m = re.search("/Volumes/(.+$)", output)
m = re.search(r"/Volumes/(.+$)", output)
disk_root = m.group(0)
disk_name = m.group(1)