def console_msg(self, msg):
        if 'sockets' in msg:
            sockets = []
            for sock in msg['sockets']:
                d = "%(fd)d:socket '%(name)s' "
                if 'path' in sock:
                    d = (d + 'at %(path)s') % sock
                else:
                    d = (d + 'at %(host)s:%(port)d') % sock

                sockets.append(d)

            return "\n".join(sockets)

        return self.console_error(msg)
dataset/ETHPy150Open circus-tent/circus/circus/commands/listsockets.py/ListSockets.console_msg/original