]> git.ipfire.org Git - thirdparty/qemu.git/commit
iotests: use with-statement for open() calls
authorJohn Snow <jsnow@redhat.com>
Tue, 20 Jul 2021 17:33:20 +0000 (13:33 -0400)
committerHanna Reitz <hreitz@redhat.com>
Wed, 1 Sep 2021 10:57:31 +0000 (12:57 +0200)
commit06aad78b825cc25329411b10c159f96819ce39a1
treef865f7d70855c35dea0bdd6d2a51ba9816084d8c
parentb68ce824098e4470e5c4f81065896a9ca8a45792
iotests: use with-statement for open() calls

Silences a new pylint warning. The dangers of *not* doing this are
somewhat unclear; I believe the file object gets garbage collected
eventually, but possibly the way in which it happens is
non-deterministic. Maybe this is a valid warning, but if there are
consequences of not doing it, I am not aware of them at present.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210720173336.1876937-2-jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
tests/qemu-iotests/iotests.py