mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-03 12:11:52 +02:00
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:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user