How to use the sarge.capture_stdout function in sarge

To help you get started, we’ve selected a few sarge examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ManageIQ / integration_tests / rhci / scripts / rhci_common.py View on Github external
def virsh(args):
    result = sarge.capture_stdout('virsh {}'.format(args))
    if result.returncode != 0:
        raise RuntimeError('virsh command failed with exit code {}'.format(result.returncode))
    return result.stdout.read().strip()
github jlesquembre / autopilot / src / autopilot / utils.py View on Github external
def stdout(command):
    return sarge.capture_stdout(command).stdout.text.strip()
github adamcharnock / dokku-client / dokku_client / commands / __init__.py View on Github external
def run_remote(self, cmd, input=None):
        host = self.args['--host']
        return capture_stdout('ssh %s -- %s' % (host, cmd), input=input)

sarge

A wrapper for subprocess which provides command pipeline functionality.

BSD-2-Clause
Latest version published 2 years ago

Package Health Score

49 / 100
Full package analysis