def _exec_cmd()

in scripts/ebcli_installer.py [0:0]


def _exec_cmd(args, quiet):
    """
    Function invokes `subprocess.Popen` in the `shell=True` mode and returns
    the return code of the subprocess.

    :param args: the args to pass to `subprocess.Popen`
    :param quiet: Whether to avoid displaying output of the subprocess to
                  STDOUT
    :return: the return code of the subprocess
    """
    stdout = subprocess.PIPE if quiet else None
    p = subprocess.Popen(
        ' '.join(args),
        stdout=stdout,
        stderr=stdout,
        shell=True
    )

    p.communicate()

    return p.returncode