sebastien/cuisine — Issue #41: file_write
Author: schacki
Created: 2012-02-07 12:43:39+00:00
State: open

in the file_write function, if the following put operations fails
fabric.operations.put(local_path, location, use_sudo=(mode == MODE_SUDO))

the following code to remove temp file
# Remove the local temp file
os.close(fd)
os.unlink(local_path)

will never be executed and the temp file will stay forever.
can the error be catched and ensured that the removal code is executed?