def doTerminalCmd()

in tools/k8s-rbac-policies/rbac_patch.py [0:0]


def doTerminalCmd(cmd):
    with temp.TemporaryFile() as f:
        process = sp.Popen(cmd, stdout=f, stderr=f)
        process.wait()
        f.seek(0)
        msg = f.read().decode()
    return msg