def METHOD_NAME(command, printonly=False, exitOnError=True):
    print(' '.join(command))
    if printonly:
        return
    try:
        result = run(command, stdout=PIPE, stderr=PIPE, universal_newlines=True, check=True)
    except CalledProcessError as e:
        print('Error running ' + ' '.join(command))
        print(e.stdout)
        print(e.stderr)
        if exitOnError:
            fatal(2)
        else:
            print('continuing anyway')
    else:
        return result.stdout.rstrip()