diff --git a/qa/rpc-tests/p2p-acceptblock.py b/qa/rpc-tests/p2p-acceptblock.py index d50198825..321c4983b 100755 --- a/qa/rpc-tests/p2p-acceptblock.py +++ b/qa/rpc-tests/p2p-acceptblock.py @@ -186,7 +186,7 @@ class AcceptBlockTest(BitcoinTestFramework): if x['hash'] == blocks_h2f[1].hash: assert_equal(x['status'], "valid-headers") - print "Second height 2 block accepted only from whitelisted peer" + print("Second height 2 block accepted only from whitelisted peer") # 4. Now send another block that builds on the forking chain. blocks_h3 = [] @@ -206,13 +206,13 @@ class AcceptBlockTest(BitcoinTestFramework): # But this block should be accepted by node0 since it has more work. try: self.nodes[0].getblock(blocks_h3[0].hash) - print "Unrequested more-work block accepted from non-whitelisted peer" + print("Unrequested more-work block accepted from non-whitelisted peer") except: raise AssertionError("Unrequested more work block was not processed") # Node1 should have accepted and reorged. assert_equal(self.nodes[1].getblockcount(), 3) - print "Successfully reorged to length 3 chain from whitelisted peer" + print("Successfully reorged to length 3 chain from whitelisted peer") # 4b. Now mine 288 more blocks and deliver; all should be processed but # the last (height-too-high) on node0. Node1 should process the tip if diff --git a/qa/zcash/create_benchmark_archive.py b/qa/zcash/create_benchmark_archive.py index 93200ea6c..a1b96d852 100644 --- a/qa/zcash/create_benchmark_archive.py +++ b/qa/zcash/create_benchmark_archive.py @@ -167,7 +167,7 @@ def create_benchmark_archive(blk_hash): js_txs = len([tx for tx in txs if len(tx['vjoinsplit']) > 0]) if js_txs: - print 'Block contains %d JoinSplit-containing transactions' % js_txs + print('Block contains %d JoinSplit-containing transactions' % js_txs) return inputs = [(x['txid'], x['vout']) for tx in txs for x in tx['vin'] if x.has_key('txid')] diff --git a/qa/zcash/test-depends-sources-mirror.py b/qa/zcash/test-depends-sources-mirror.py index bf049c921..2ad60052a 100755 --- a/qa/zcash/test-depends-sources-mirror.py +++ b/qa/zcash/test-depends-sources-mirror.py @@ -30,13 +30,13 @@ for filename in get_depends_sources_list(): 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)) server_size = int(resp.headers['Content-Length']) if expected_size != server_size: - print "FAIL. On the server, %s is %d bytes, but locally it is %d bytes." % (filename, server_size, expected_size) + print("FAIL. On the server, %s is %d bytes, but locally it is %d bytes." % (filename, server_size, expected_size)) sys.exit(1) print "PASS." diff --git a/zcutil/release-notes.py b/zcutil/release-notes.py index e4d58a2c0..0fa9d1095 100755 --- a/zcutil/release-notes.py +++ b/zcutil/release-notes.py @@ -101,14 +101,14 @@ def document_authors(): ## Writes release note to ./doc/release-notes based on git shortlog when current version number is specified def generate_release_note(version, prev, clear): filename = 'release-notes-{0}.md'.format(version) - print "Automatically generating release notes for {0} from git shortlog. Should review {1} for accuracy.".format(version, filename) + print("Automatically generating release notes for {0} from git shortlog. Should review {1} for accuracy.".format(version, filename)) if prev: latest_tag = prev else: # fetches latest tags, so that latest_tag will be correct subprocess.Popen(['git fetch -t'], shell=True, stdout=subprocess.PIPE).communicate()[0] latest_tag = subprocess.Popen(['git describe --abbrev=0'], shell=True, stdout=subprocess.PIPE).communicate()[0].strip() - print "Previous release tag: ", latest_tag + print("Previous release tag: ", latest_tag) notes = subprocess.Popen(['git shortlog --no-merges {0}..HEAD'.format(latest_tag)], shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE).communicate()[0] lines = notes.split('\n') lines = [alias_authors_in_release_notes(line) for line in lines]