[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 5/6] python/machine: Disable pylint warning for open() in
From: |
Cleber Rosa |
Subject: |
Re: [PATCH v2 5/6] python/machine: Disable pylint warning for open() in _pre_launch |
Date: |
Tue, 18 May 2021 00:07:12 -0400 |
On Mon, May 17, 2021 at 02:48:07PM -0400, John Snow wrote:
> Shift the open() call later so that the pylint pragma applies *only* to
> that one open() call. Add a note that suggests why this is safe: the
> resource is unconditionally cleaned up in _post_shutdown().
>
> _post_shutdown is called after failed launches (see launch()), and
> unconditionally after every call to shutdown(), and therefore also on
> __exit__.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> ---
> python/qemu/machine.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
signature.asc
Description: PGP signature
- [PATCH v2 0/6] Python: delint python library, John Snow, 2021/05/17
- [PATCH v2 1/6] python/console_socket: avoid one-letter variable, John Snow, 2021/05/17
- [PATCH v2 2/6] python/machine: use subprocess.DEVNULL instead of open(os.path.devnull), John Snow, 2021/05/17
- [PATCH v2 3/6] python/machine: use subprocess.run instead of subprocess.Popen, John Snow, 2021/05/17
- [PATCH v2 5/6] python/machine: Disable pylint warning for open() in _pre_launch, John Snow, 2021/05/17
- Re: [PATCH v2 5/6] python/machine: Disable pylint warning for open() in _pre_launch,
Cleber Rosa <=
- [PATCH v2 6/6] python/machine: disable warning for Popen in _launch(), John Snow, 2021/05/17
- [PATCH v2 4/6] python/console_socket: Add a pylint ignore, John Snow, 2021/05/17
- Re: [PATCH v2 0/6] Python: delint python library, John Snow, 2021/05/18