Re: [PATCH 4/5] python/qemu: qmp: Make QEMUMonitorProtocol a context manager

2020-01-29 Thread Wainer dos Santos Moschetta
On 1/8/20 10:23 PM, John Snow wrote: On 12/27/19 8:41 AM, Wainer dos Santos Moschetta wrote: This implement the __enter__ and __exit__ functions on QEMUMonitorProtocol class so that it can be used on 'with' statement and the resources will be free up on block end: with QEMUMonitorProtocol(so

Re: [PATCH 4/5] python/qemu: qmp: Make QEMUMonitorProtocol a context manager

2020-01-08 Thread John Snow
On 12/27/19 8:41 AM, Wainer dos Santos Moschetta wrote: > This implement the __enter__ and __exit__ functions on > QEMUMonitorProtocol class so that it can be used on 'with' > statement and the resources will be free up on block end: > > with QEMUMonitorProtocol(socket_path) as qmp: > qmp.c

[PATCH 4/5] python/qemu: qmp: Make QEMUMonitorProtocol a context manager

2019-12-27 Thread Wainer dos Santos Moschetta
This implement the __enter__ and __exit__ functions on QEMUMonitorProtocol class so that it can be used on 'with' statement and the resources will be free up on block end: with QEMUMonitorProtocol(socket_path) as qmp: qmp.connect() qmp.command('query-status') Signed-off-by: Wainer dos San