aboutsummaryrefslogtreecommitdiff
path: root/contrib/seeds
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-06-12 17:49:20 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-06-12 21:34:52 +0200
commit634bd970013eca90f4b4c1f9044eec8c97ba62c2 (patch)
treecf308babc695722ab55344bcd27b1b68802ce3f9 /contrib/seeds
parentfa4b9065a8298f546d91fe382b4517fbf30749c1 (diff)
downloadbitcoin-634bd970013eca90f4b4c1f9044eec8c97ba62c2.tar.xz
Explicitly specify encoding when opening text files in Python code
Diffstat (limited to 'contrib/seeds')
-rwxr-xr-xcontrib/seeds/generate-seeds.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/seeds/generate-seeds.py b/contrib/seeds/generate-seeds.py
index ace7d3534f..fe7cd1d597 100755
--- a/contrib/seeds/generate-seeds.py
+++ b/contrib/seeds/generate-seeds.py
@@ -127,10 +127,10 @@ def main():
g.write(' * Each line contains a 16-byte IPv6 address and a port.\n')
g.write(' * IPv4 as well as onion addresses are wrapped inside an IPv6 address accordingly.\n')
g.write(' */\n')
- with open(os.path.join(indir,'nodes_main.txt'),'r') as f:
+ with open(os.path.join(indir,'nodes_main.txt'), 'r', encoding="utf8") as f:
process_nodes(g, f, 'pnSeed6_main', 8333)
g.write('\n')
- with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
+ with open(os.path.join(indir,'nodes_test.txt'), 'r', encoding="utf8") as f:
process_nodes(g, f, 'pnSeed6_test', 18333)
g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n')