Revision 55e711aa lib/hypervisor/hv_kvm/monitor.py
b/lib/hypervisor/hv_kvm/monitor.py | ||
---|---|---|
207 | 207 |
self._buf = "" |
208 | 208 |
self.supported_commands = None |
209 | 209 |
|
210 |
def __enter__(self): |
|
211 |
self.connect() |
|
212 |
return self |
|
213 |
|
|
214 |
def __exit__(self, exc_type, exc_value, tb): |
|
215 |
self.close() |
|
216 |
|
|
210 | 217 |
def connect(self): |
211 | 218 |
"""Connects to the QMP monitor. |
212 | 219 |
|
Also available in: Unified diff