(self, *popenargs, **kwargs)
return output
Alternative to subprocess.check_output
Alternative to subprocess.check_output
Alternative to subprocess . check_output
def _check_output(self, *popenargs, **kwargs):
        """Alternative to subprocess.check_output"""
        process = subprocess.Popen(*popenargs, stdout=subprocess.PIPE, **kwargs)
        output, dummy = process.communicate()
        retcode = process.poll()
        if retcode:
            cmd = kwargs.get("args")
            if cmd is None:
                cmd = popenargs[0]
            raise subprocess.CalledProcessError(retcode, cmd)
        return output
def _check_output ( self , * popenargs , * * kwargs ) : process = subprocess . Popen ( * popenargs , stdout = subprocess . PIPE , * * kwargs ) output , dummy = process . communicate ( ) retcode = process . poll ( ) if retcode : cmd = kwargs . get ( "args" ) if cmd is None : cmd = popenargs [ 0 ] raise subprocess . CalledProcessError ( retcode , cmd ) return output