Skip to content

Commit

Permalink
python/machine: disable warning for Popen in _launch()
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-id: 20210527211715.394144-7-jsnow@redhat.com
Message-id: 20210517184808.3562549-7-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
  • Loading branch information
jnsnow committed Jun 1, 2021
1 parent 63c33f3 commit a0eae17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/qemu/machine.py
Expand Up @@ -405,6 +405,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,
Expand Down

0 comments on commit a0eae17

Please sign in to comment.