nixos/test-driver: fix resource cleanup of vlan/qmp objects
Using __del__ is somewhat unsound resource cleanup in our clase the logger already closed its logfile and therefor fails with exception before the rest of the resources can be cleaned up.
This commit is contained in:
@@ -49,7 +49,7 @@ class QMPSession:
|
||||
sock.connect(str(path))
|
||||
return cls(sock)
|
||||
|
||||
def __del__(self) -> None:
|
||||
def close(self) -> None:
|
||||
self.sock.close()
|
||||
|
||||
def _wait_for_new_result(self) -> dict[str, str]:
|
||||
|
||||
Reference in New Issue
Block a user