[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/7] iotests: Replace deprecated ConfigParser.readfp()
From: |
Kevin Wolf |
Subject: |
[PULL 2/7] iotests: Replace deprecated ConfigParser.readfp() |
Date: |
Tue, 17 Nov 2020 13:15:53 +0100 |
iotest 277 fails on Fedora 33 (Python 3.9) because a deprecation warning
changes the output:
nbd-fault-injector.py:230: DeprecationWarning: This method will be
removed in future versions. Use 'parser.read_file()' instead.
In fact, readfp() has already been deprecated in Python 3.2 and the
replacement has existed since the same version, so we can now
unconditionally switch to read_file().
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201113100602.15936-1-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/nbd-fault-injector.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/nbd-fault-injector.py
b/tests/qemu-iotests/nbd-fault-injector.py
index 78f42c4214..6e11ef89b8 100755
--- a/tests/qemu-iotests/nbd-fault-injector.py
+++ b/tests/qemu-iotests/nbd-fault-injector.py
@@ -227,7 +227,7 @@ def parse_config(config):
def load_rules(filename):
config = configparser.RawConfigParser()
with open(filename, 'rt') as f:
- config.readfp(f, filename)
+ config.read_file(f, filename)
return parse_config(config)
def open_socket(path):
--
2.28.0
- [PULL 0/7] Patches for 5.2.0-rc2, Kevin Wolf, 2020/11/17
- [PULL 1/7] char-stdio: Fix QMP default for 'signal', Kevin Wolf, 2020/11/17
- [PULL 2/7] iotests: Replace deprecated ConfigParser.readfp(),
Kevin Wolf <=
- [PULL 4/7] io_uring: do not use pointer after free, Kevin Wolf, 2020/11/17
- [PULL 3/7] file-posix: allow -EBUSY errors during write zeros on raw block devices, Kevin Wolf, 2020/11/17
- [PULL 5/7] quorum: Require WRITE perm with rewrite-corrupted, Kevin Wolf, 2020/11/17
- [PULL 6/7] iotests/081: Filter image format after testdir, Kevin Wolf, 2020/11/17
- [PULL 7/7] iotests/081: Test rewrite-corrupted without WRITE, Kevin Wolf, 2020/11/17
- Re: [PULL 0/7] Patches for 5.2.0-rc2, Peter Maydell, 2020/11/17