Skip to content

Commit 49e5662

Browse files
committed
fix deprecation in bitcoin-util-test.py
To avoid: $ make check {…omissis…} Running test/util/bitcoin-util-test.py... /usr/local/bin/python3.7 ../test/util/bitcoin-util-test.py ../test/util/bitcoin-util-test.py:31: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead. config.readfp(open(os.path.join(os.path.dirname(__file__), "../config.ini"), encoding="utf8")) $ python3 --version Python 3.7.0
1 parent 73a09b4 commit 49e5662

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/util/bitcoin-util-test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
def main():
2929
config = configparser.ConfigParser()
3030
config.optionxform = str
31-
config.readfp(open(os.path.join(os.path.dirname(__file__), "../config.ini"), encoding="utf8"))
31+
config.read_file(open(os.path.join(os.path.dirname(__file__), "../config.ini"), encoding="utf8"))
3232
env_conf = dict(config.items('environment'))
3333

3434
parser = argparse.ArgumentParser(description=__doc__)

0 commit comments

Comments
 (0)