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. --- test/functional/combine_logs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/combine_logs.py') diff --git a/test/functional/combine_logs.py b/test/functional/combine_logs.py index 5364ac4b8c..367d0f6916 100755 --- a/test/functional/combine_logs.py +++ b/test/functional/combine_logs.py @@ -81,7 +81,7 @@ def read_logs(tmp_dir): chain = glob.glob("{}/node0/*/debug.log".format(tmp_dir)) if chain: chain = chain[0] # pick the first one if more than one chain was found (should never happen) - chain = re.search('node0/(.+?)/debug\.log$', chain).group(1) # extract the chain name + chain = re.search(r'node0/(.+?)/debug\.log$', chain).group(1) # extract the chain name else: chain = 'regtest' # fallback to regtest (should only happen when none exists) -- cgit v1.2.3