aboutsummaryrefslogtreecommitdiff
path: root/contrib/seeds
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2019-02-01 17:00:02 -0800
committerBen Woosley <ben.woosley@gmail.com>2019-09-03 14:38:38 -0400
commitb21680baf5391a602b295b9d7d0ef66553661cb9 (patch)
tree014dde0638aa584215f4855341606de65ed1fb89 /contrib/seeds
parent6e431296daceee604f48e9e3e87fa84cfd44bef2 (diff)
downloadbitcoin-b21680baf5391a602b295b9d7d0ef66553661cb9.tar.xz
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.
Diffstat (limited to 'contrib/seeds')
-rwxr-xr-xcontrib/seeds/generate-seeds.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/seeds/generate-seeds.py b/contrib/seeds/generate-seeds.py
index fe7cd1d597..7630a7a4fa 100755
--- a/contrib/seeds/generate-seeds.py
+++ b/contrib/seeds/generate-seeds.py
@@ -74,7 +74,7 @@ def name_to_ipv6(addr):
raise ValueError('Could not parse address %s' % addr)
def parse_spec(s, defaultport):
- match = re.match('\[([0-9a-fA-F:]+)\](?::([0-9]+))?$', s)
+ match = re.match(r'\[([0-9a-fA-F:]+)\](?::([0-9]+))?$', s)
if match: # ipv6
host = match.group(1)
port = match.group(2)
@@ -136,4 +136,3 @@ def main():
if __name__ == '__main__':
main()
-