How to use the pysd.Xml_rpc_proxy function in pysd

To help you get started, we’ve selected a few pysd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github KonishchevDmitry / pysd / pysd.py View on Github external
def __connect(self):
        """Ensures that we are connected to the XML-RPC server."""

        try:
            if self.__connection == None or not self.__token:
                self.__connection = xmlrpclib.ServerProxy(
                    "http://api.opensubtitles.org/xml-rpc", transport = Xml_rpc_proxy(), allow_none = True )
                self.__token = self.__call("LogIn", "", "", "en", "pysd 0.1")["token"]
        except Exception as e:
            raise Fatal_error("Unable to connect to {0} XML-RPC server: {1}.", self.__domain_name, e)