Fix remaining python3 conventions
This commit is contained in:
parent
fdac835b13
commit
826135d5ed
|
@ -167,7 +167,7 @@ class AcceptBlockTest(BitcoinTestFramework):
|
|||
[ x.sync_with_ping() for x in [test_node, white_node] ]
|
||||
assert_equal(self.nodes[0].getblockcount(), 2)
|
||||
assert_equal(self.nodes[1].getblockcount(), 2)
|
||||
print "First height 2 block accepted by both nodes"
|
||||
print("First height 2 block accepted by both nodes")
|
||||
|
||||
# 3. Send another block that builds on the original tip.
|
||||
blocks_h2f = [] # Blocks at height 2 that fork off the main chain
|
||||
|
|
|
@ -81,7 +81,7 @@ def ParseScriptFlags(flag_string):
|
|||
if x in flag_map:
|
||||
flags |= flag_map[x]
|
||||
else:
|
||||
print "Error: unrecognized script flag: ", x
|
||||
print("Error: unrecognized script flag: ", x)
|
||||
return flags
|
||||
|
||||
'''
|
||||
|
|
|
@ -30,7 +30,7 @@ LD_LIBRARY_PATH=src/leveldb python qa/zcash/create_benchmark_archive.py
|
|||
|
||||
def check_deps():
|
||||
if subprocess.call(['which', 'find', 'xz', ZCASH_CLI], stdout=subprocess.PIPE):
|
||||
print USAGE
|
||||
print(USAGE)
|
||||
sys.exit()
|
||||
|
||||
def encode_varint(n):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2017 The Zcash developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
||||
|
@ -13,8 +13,6 @@
|
|||
# - Archive the resulting /tmp/test###### directory
|
||||
#
|
||||
|
||||
import sys; assert sys.version_info < (3,), ur"This script does not run under Python 3. Please use Python 2.7.x."
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_equal,
|
||||
|
|
|
@ -27,10 +27,10 @@ def get_depends_sources_list():
|
|||
for filename in get_depends_sources_list():
|
||||
resp = requests.head(MIRROR_URL_DIR + filename)
|
||||
|
||||
print "Checking [" + filename + "] ..."
|
||||
print("Checking [" + filename + "] ...")
|
||||
|
||||
if resp.status_code != 200:
|
||||
print "FAIL. File not found on server: " + filename
|
||||
print("FAIL. File not found on server: " + filename)
|
||||
sys.exit(1)
|
||||
|
||||
expected_size = os.path.getsize(os.path.join(DEPENDS_SOURCES_DIR, filename))
|
||||
|
|
|
@ -656,7 +656,7 @@ if __name__ == '__main__':
|
|||
actualargs = sys.argv
|
||||
sys.argv = [sys.argv[0], '--verbose']
|
||||
|
||||
print '=== Self Test ==='
|
||||
print('=== Self Test ===')
|
||||
try:
|
||||
unittest.main()
|
||||
except SystemExit as e:
|
||||
|
@ -664,5 +664,5 @@ if __name__ == '__main__':
|
|||
raise
|
||||
|
||||
sys.argv = actualargs
|
||||
print '=== Running ==='
|
||||
print('=== Running ===')
|
||||
main()
|
||||
|
|
|
@ -76,7 +76,7 @@ def authors_in_release_notes(filename):
|
|||
|
||||
## Sums commits made by contributors in each Zcash release note in ./doc/release-notes and writes to authors.md
|
||||
def document_authors():
|
||||
print "Writing contributors documented in release-notes directory to authors.md."
|
||||
print("Writing contributors documented in release-notes directory to authors.md.")
|
||||
authors_file = os.path.join(doc_dir, 'authors.md')
|
||||
with open(authors_file, 'w') as f:
|
||||
f.write('Zcash Contributors\n==================\n\n')
|
||||
|
|
Loading…
Reference in New Issue