import subprocess

def rmtree(path):
    subprocess.check_call(['rm', '-r', path])

@@ -76,8 +76,559 @@
  path%5D)%0A
+%0Adef check_output(*popenargs, **kwargs):%0A    # For python2.6 support%0A    if 'stdout' in kwargs:%0A        raise ValueError('stdout argument not allowed, ' + %5C%0A            'it will be overridden.')%0A    process = subprocess.Popen(stdout=subprocess.PIPE,%0A        *popenargs, **kwargs)%0A    output, unused_err = process.communicate()%0A    retcode = process.poll()%0A    if retcode:%0A        cmd = kwargs.get('args')%0A        if cmd is None:%0A            cmd = popenargs%5B0%5D%0A        raise subprocess.CalledProcessError(retcode, cmd, output=output)%0A    return output%0A

Add check output to utils