xemu/scripts
John Snow d1d14e5989 scripts/qmp-shell: Use context manager instead of atexit
We can invoke the shell history writing when we leave the QMPShell scope
instead of relying on atexit. Doing so may be preferable to avoid global
state being registered from within a class instead of from the
application logic directly.

Use QMP's context manager to hook this history saving at close time,
which gets invoked when we leave the context block.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20210607200649.1840382-32-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2021-06-18 16:10:07 -04:00
..
2021-05-20 17:10:09 +02:00
2021-01-12 12:38:03 +01:00
2020-08-21 06:30:39 -04:00
2020-08-21 06:30:14 -04:00
2021-01-12 12:38:03 +01:00
2021-05-27 12:06:37 +02:00