(cmd, cwd=None)
helper function to execute a command. returns stdout a la readlines().
    if any error occurs (exception, error return code), error is logged and
    None is returned. stderr is logged even if no error.

    cmd -- command to execute (will be passed to shell)
    cwd -- working directory in which to run command

    note: common directories will be automatically added to the syspath
helper function to execute a command. returns stdout a la readlines().
    if any error occurs (exception, error return code), error is logged and
    None is returned. stderr is logged even if no error.
helper function to execute a command . returns stdout a la readlines () . if any error occurs ( exception error return code ) error is logged and None is returned . stderr is logged even if no error .
def shell_exec(cmd, cwd=None):
    """helper function to execute a command. returns stdout a la readlines().
    if any error occurs (exception, error return code), error is logged and
    None is returned. stderr is logged even if no error.

    cmd -- command to execute (will be passed to shell)
    cwd -- working directory in which to run command

    note: common directories will be automatically added to the syspath"""
    try:
        return shell_exec_checked(cmd, cwd)
    except ShellCommandError as e:
        logging.exception('error executing command [%s]' % cmd)
        return None
def shell_exec ( cmd , cwd = None ) : try : return shell_exec_checked ( cmd , cwd ) except ShellCommandError as e : logging . exception ( 'error executing command [%s]' % cmd ) return None