def check_output(cmd):
    encoding = locale.getdefaultlocale()[1] or 'utf-8'
    if hasattr(subprocess, 'check_output'):
        output = subprocess.check_output(cmd)
    else:
        # Python 2.6 doesn't have check_output
        proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                                stderr=subprocess.STDOUT)
        output = proc.communicate()[0]
        if proc.returncode != 0:
            raise subprocess.CalledProcessError(proc.returncode, cmd,
                                                output)
    return output.decode(encoding)
Service one received duple (raw, ha) raw packet data or chunk from server
dataset/ETHPy150Open mathcamp/pypicloud/git_hooks/hook.py/check_output--crossover with--dataset/ETHPy150Open ioflo/ioflo/ioflo/aio/proto/stacking.py/Stack._serviceOneReceived