mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-17 15:09:26 +03:00
nixos/test-driver: black
This commit is contained in:
parent
e78f177a8a
commit
07e7fcc46f
1 changed files with 4 additions and 2 deletions
|
@ -768,7 +768,9 @@ class Machine:
|
||||||
self.booted = False
|
self.booted = False
|
||||||
self.connected = False
|
self.connected = False
|
||||||
|
|
||||||
def wait_for_qmp_event(self, event_filter: Callable[[dict[str, Any]], bool], timeout: int = 60 * 10) -> dict[str, Any]:
|
def wait_for_qmp_event(
|
||||||
|
self, event_filter: Callable[[dict[str, Any]], bool], timeout: int = 60 * 10
|
||||||
|
) -> dict[str, Any]:
|
||||||
"""
|
"""
|
||||||
Wait for a QMP event which you can filter with the `event_filter` function.
|
Wait for a QMP event which you can filter with the `event_filter` function.
|
||||||
The function takes as an input a dictionary of the event and if it returns True, we return that event,
|
The function takes as an input a dictionary of the event and if it returns True, we return that event,
|
||||||
|
@ -780,7 +782,7 @@ class Machine:
|
||||||
By default, it will wait up to 10 minutes, `timeout` is in seconds.
|
By default, it will wait up to 10 minutes, `timeout` is in seconds.
|
||||||
"""
|
"""
|
||||||
if self.qmp_client is None:
|
if self.qmp_client is None:
|
||||||
raise RuntimeError('QMP API is not ready yet, is the VM ready?')
|
raise RuntimeError("QMP API is not ready yet, is the VM ready?")
|
||||||
|
|
||||||
start = time.time()
|
start = time.time()
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue