Revision 13bb1b4c lib/hypervisor/hv_kvm/monitor.py
b/lib/hypervisor/hv_kvm/monitor.py | ||
---|---|---|
215 | 215 |
self._buf = "" |
216 | 216 |
self.supported_commands = None |
217 | 217 |
|
218 |
def __enter__(self): |
|
219 |
self.connect() |
|
220 |
return self |
|
221 |
|
|
222 |
def __exit__(self, exc_type, exc_value, tb): |
|
223 |
self.close() |
|
224 |
|
|
218 | 225 |
def connect(self): |
219 | 226 |
"""Connects to the QMP monitor. |
220 | 227 |
|
Also available in: Unified diff