This is an example of how the code could take advantage of
Python contexts. The with statement will open the context
and when it is left (either normally or because of an exception),
the __exit__() method is called and can be used to cleanup.
Cleaning up is in this case umounting the image file, but could
also be used to shutdown and destroy a virtual machine or
network.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>