def overloaded(self, client_address):
        """
        Got too many requests.
        Send back a (precompiled) XMLRPC response saying as much
        """
        body = {
            'status': False,
            'indexing': False,
            'lastblock': -1,
            'error': 'overloaded',
            'http_status': 429
        }
        body_str = json.dumps(body)

        resp = 'HTTP/1.0 200 OK\r\nServer: BaseHTTP/0.3 Python/2.7.14+\r\nContent-type: text/xml\r\nContent-length: {}\r\n\r\n'.format(len(body_str))
        resp += '<methodResponse><params><param><value><string>{}</string></value></param></params></methodResponse>'.format(body_str)
        return resp
def overloaded ( self , client_address ) : body = { 'status' : False , 'indexing' : False , 'lastblock' : - 1 , 'error' : 'overloaded' , 'http_status' : 429 } body_str = json . dumps ( body ) resp = 'HTTP/1.0 200 OK\r\nServer: BaseHTTP/0.3 Python/2.7.14+\r\nContent-type: text/xml\r\nContent-length: {}\r\n\r\n' . format ( len ( body_str ) ) resp += '<methodResponse><params><param><value><string>{}</string></value></param></params></methodResponse>' . format ( body_str ) return resp
Got too many requests.
        Send back a (precompiled) XMLRPC response saying as much