From b21680baf5391a602b295b9d7d0ef66553661cb9 Mon Sep 17 00:00:00 2001 From: Ben Woosley Date: Fri, 1 Feb 2019 17:00:02 -0800 Subject: 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. --- contrib/devtools/symbol-check.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'contrib/devtools/symbol-check.py') diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py index dd35d862c9..d8b684026c 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -141,7 +141,7 @@ def read_libraries(filename): for line in stdout.splitlines(): tokens = line.split() if len(tokens)>2 and tokens[1] == '(NEEDED)': - match = re.match('^Shared library: \[(.*)\]$', ' '.join(tokens[2:])) + match = re.match(r'^Shared library: \[(.*)\]$', ' '.join(tokens[2:])) if match: libraries.append(match.group(1)) else: @@ -171,5 +171,3 @@ if __name__ == '__main__': retval = 1 sys.exit(retval) - - -- cgit v1.2.3