[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/10] python/machine: disable warning for Popen in _launch()
From: |
John Snow |
Subject: |
[PATCH 06/10] python/machine: disable warning for Popen in _launch() |
Date: |
Wed, 12 May 2021 17:46:38 -0400 |
We handle this resource rather meticulously in
shutdown/kill/wait/__exit__ et al, through the laborious mechanisms in
_do_shutdown().
Quiet this pylint warning here.
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/machine.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/python/qemu/machine.py b/python/qemu/machine.py
index 8f86303b48f..0df5b2f386f 100644
--- a/python/qemu/machine.py
+++ b/python/qemu/machine.py
@@ -407,6 +407,9 @@ def _launch(self) -> None:
self._args)
)
LOG.debug('VM launch command: %r', ' '.join(self._qemu_full_args))
+
+ # Cleaning up of this subprocess is guaranteed by _do_shutdown.
+ # pylint: disable=consider-using-with
self._popen = subprocess.Popen(self._qemu_full_args,
stdin=subprocess.DEVNULL,
stdout=self._qemu_log_file,
--
2.30.2
- [PATCH 00/10] Python: delint iotests, machine.py and console_socket.py, John Snow, 2021/05/12
- [PATCH 01/10] python/console_socket: avoid one-letter variable, John Snow, 2021/05/12
- [PATCH 03/10] python/machine: use subprocess.run instead of subprocess.Popen, John Snow, 2021/05/12
- [PATCH 04/10] python/console_socket: Add a pylint ignore, John Snow, 2021/05/12
- [PATCH 08/10] iotests: use 'with open()' where applicable, John Snow, 2021/05/12
- [PATCH 06/10] python/machine: disable warning for Popen in _launch(),
John Snow <=
- [PATCH 09/10] iotests: silence spurious consider-using-with warnings, John Snow, 2021/05/12
- [PATCH 07/10] iotests: use subprocess.run where possible, John Snow, 2021/05/12
- [PATCH 02/10] python/machine: use subprocess.DEVNULL instead of open(os.path.devnull), John Snow, 2021/05/12
- [PATCH 10/10] iotests: ensure that QemuIoInteractive definitely closes, John Snow, 2021/05/12
- [PATCH 05/10] python/machine: Disable pylint warning for open() in _pre_launch, John Snow, 2021/05/12
- Re: [PATCH 00/10] Python: delint iotests, machine.py and console_socket.py, John Snow, 2021/05/17