def shell(cmd, **kwargs):
    """Execute cmd, check exit code, return stdout"""
    logger.debug("$ %s", cmd)
    return subprocess.check_output(cmd, shell=True, **kwargs)
def shell ( cmd , ** kwargs ) : logger . debug ( "$ %s" , cmd ) return subprocess . check_output ( cmd , shell = True , ** kwargs )
Execute cmd, check exit code, return stdout