devices/loopback: close loop device controller
In the `close` method of the device also close the loop controller.
This commit is contained in:
parent
82ecc530a1
commit
3d08e84ceb
1 changed files with 4 additions and 0 deletions
|
|
@ -127,6 +127,10 @@ class LoopbackService(devices.DeviceService):
|
|||
return res
|
||||
|
||||
def close(self):
|
||||
# Calling `close` is valid on closed
|
||||
# `LoopControl` and `Loop` objects
|
||||
self.ctl.close()
|
||||
|
||||
if self.lo:
|
||||
self.lo.close()
|
||||
self.lo = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue