def status(self, query='\n', agent=None):
        result = []
        try:
            self._logger('info', "query: '{}'".format(query.rstrip()))
            qry = b''
            if not query.endswith('\n'):  # pragma: no cover
                qry += '{0}\n'.format(query).encode('utf-8')
            else:
                qry += query.encode('utf-8')
            sock = socket.socket(self.family, socket.SOCK_STREAM)
            sock.connect((self.host, self.port))
            sock.send(qry)
            sock.shutdown(socket.SHUT_WR)
            fileobj = sock.makefile()
            sock.close()
            for line in fileobj.readlines():
                line = line.rstrip('\n')
                if not line:
                    continue
                try:
                    if not PY3:
                        line = line.decode('utf-8', 'replace')
                except UnicodeDecodeError:  # pragma: no cover
                    pass
                result.append(line)
            fileobj.close()
            self._logger('debug', '=> {}'.format(result))
            return result
        except socket.error:
            self._logger('error', 'Cannot contact burp server at %s:%s', self.host, self.port)
            raise BUIserverException('Cannot contact burp server at {0}:{1}'.format(self.host, self.port))
Add children and change attributes on this tag.
dataset/ETHPy150Open ziirish/burp-ui/burpui/misc/backend/burp1.py/Burp.status--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/web/_stan.py/Tag.__call__