[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 03/12] python/machine.py: Add _early_cleanup hook
From: |
Cleber Rosa |
Subject: |
Re: [PATCH v5 03/12] python/machine.py: Add _early_cleanup hook |
Date: |
Mon, 13 Jul 2020 16:30:58 -0400 |
On Fri, Jul 10, 2020 at 01:06:40AM -0400, John Snow wrote:
> Some parts of cleanup need to occur prior to shutdown, otherwise
> shutdown might break. Move this into a suitably named method/callback.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> python/qemu/machine.py | 24 +++++++++++++++---------
> 1 file changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/python/qemu/machine.py b/python/qemu/machine.py
> index 938c891b1d..4280aab380 100644
> --- a/python/qemu/machine.py
> +++ b/python/qemu/machine.py
> @@ -354,16 +354,9 @@ def _launch(self):
> close_fds=False)
> self._post_launch()
>
> - def wait(self):
> + def _early_cleanup(self) -> None:
Inaugurating type hints "around here", huh? :)
WRT method name, up to the end of this series, this method is only about
closing the console socket, so *maybe* just name it accordingly and move
on to an abstract method name when/if the need arises?
Either way,
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
signature.asc
Description: PGP signature
- [PATCH v5 00/12] python/machine.py: refactor shutdown, John Snow, 2020/07/10
- [PATCH v5 02/12] python/machine.py: Close QMP socket in cleanup, John Snow, 2020/07/10
- [PATCH v5 01/12] python/machine.py: consolidate _post_shutdown(), John Snow, 2020/07/10
- [PATCH v5 03/12] python/machine.py: Add _early_cleanup hook, John Snow, 2020/07/10
- [PATCH v5 05/12] python/machine.py: Prohibit multiple shutdown() calls, John Snow, 2020/07/10
- [PATCH v5 04/12] python/machine.py: Perform early cleanup for wait() calls, too, John Snow, 2020/07/10
- [PATCH v5 06/12] python/machine.py: Add a configurable timeout to shutdown(), John Snow, 2020/07/10