diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2017-08-24 08:22:02 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2017-09-05 10:32:07 +0100 |
commit | 921a32179bb0a31c45a505f4ef36de4893be9612 (patch) | |
tree | ac63f9bb79c868024024253ef153eeb89697dd36 /net/tap-bsd.c | |
parent | f4844ac0adabc458ba4610a71155448783d37c73 (diff) |
qemu-iotests: use context managers for resource cleanup in 194
Switch from atexit.register() to a more elegant idiom of declaring
resources in a with statement:
with FilePath('monitor.sock') as monitor_path,
VM() as vm:
...
The files and VMs will be automatically cleaned up whether the test
passes or fails.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20170824072202.26818-4-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net/tap-bsd.c')
0 files changed, 0 insertions, 0 deletions