Exemple #1
0
def my_xmlrpclib_loads(data):
    """
    Modification of Python 2.3 xmlrpclib.loads() that does not do an
    import. Needed to prevent deadlocks.
    """

    p, u = xmlrpclib.getparser()
    p.feed(data)
    p.close()
    return u.close(), u.getmethodname()
    def __call__(self, *args):
        """
        Method is being called
        """
        # Forge the request
        request = xmlrpclib.dumps(args, self.__name, encoding='utf-8',
                                  allow_none=True)

        # Send it
        reply_message = self.__send(self.__peer, self.__subject, request)

        # Parse the reply
        parser, unmarshaller = xmlrpclib.getparser()
        parser.feed(reply_message.content)
        parser.close()
        return unmarshaller.close()
    def __call__(self, *args):
        """
        Method is being called
        """
        # Forge the request
        request = xmlrpclib.dumps(args,
                                  self.__name,
                                  encoding='utf-8',
                                  allow_none=True)

        # Send it
        reply_message = self.__send(self.__peer, self.__subject, request)

        # Parse the reply
        parser, unmarshaller = xmlrpclib.getparser()
        parser.feed(reply_message.content)
        parser.close()
        return unmarshaller.close()
Exemple #4
0
 def getparser(self):
     return xmlrpclib.getparser()
Exemple #5
0
def xml_loads(data):
    p, u = xmlrpclib.getparser()
    p.feed(data)
    p.close()
    return u.close()
Exemple #6
0
 def getparser(self):
     return xmlrpclib.getparser()
Exemple #7
0
	def __init__ (self, cache = 0):
		self.parser, self.buf = xmlrpclib.getparser()
		self.fp = BytesIO ()
		self.cache = cache
		self.cdata = None