From a7381d24ee562aa140e5ccde614901b06f569919 Mon Sep 17 00:00:00 2001 From: mdr0id Date: Wed, 4 Dec 2019 07:00:59 -0800 Subject: [PATCH] Update py2 conventions to py3, remove py2 env and assert --- qa/rpc-tests/finalsaplingroot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qa/rpc-tests/finalsaplingroot.py b/qa/rpc-tests/finalsaplingroot.py index 1f3ac8e26..568111f6f 100755 --- a/qa/rpc-tests/finalsaplingroot.py +++ b/qa/rpc-tests/finalsaplingroot.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2018 The Zcash developers # Distributed under the MIT software license, see the accompanying # file COPYING or https://www.opensource.org/licenses/mit-license.php . -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 ( @@ -49,7 +48,7 @@ class FinalSaplingRootTest(BitcoinTestFramework): # Verify all generated blocks contain the empty root of the Sapling tree. blockcount = self.nodes[0].getblockcount() - for height in xrange(1, blockcount + 1): + for height in range(1, blockcount + 1): blk = self.nodes[0].getblock(str(height)) assert_equal(blk["finalsaplingroot"], SAPLING_TREE_EMPTY_ROOT)