

def sockets(self):
    '\n        Returns a tuple of sockets connected to the pty (stdin,stdout,stderr).\n\n        If any of the sockets are not attached in the container, `None` is\n        returned in the tuple.\n        '
    info = info._container_info()

    def attach_socket(key):
        if info['Config']['Attach{0}'.format(key.capitalize())]:
            socket = self.client.attach_socket(self.container, {
                key: 1,
                'stream': 1,
                'logs': self.logs,
            })
            stream = io.Stream(socket)
            if info['Config']['Tty']:
                return stream
            else:
                return io.Demuxer(stream)
        else:
            return None
    return map(attach_socket, ('stdin', 'stdout', 'stderr'))

dataset/ETHPy150Open d11wtq/dockerpty/dockerpty/pty.py RunOperation.sockets/VarMisuse@14/91 `self`->`info`