There's command piping support in utility.py that aborts on failures, etc. E.g.

totalMemory = int(utility.pipe_cmd('free', '-m').next())

In theory it closes the pipe and handles errors in some way. The pipe isn't closed in this code.