def _GetAvailableTranslations(self, program=None): """Returns dictionary of available translations for the given program. @program: program name - string return example: {'en': {'LastCreated': '2007-02-03 21:36:14', 'StringsNo': 438}, 'ar': ...} """ self.log.debug("----------------") self.log.debug("GetAvailableTranslations RPC method starting...") if not program: program = APP_TITLE.lower() info = self.xmlrpc_server.GetAvailableTranslations( self._token, program) self.log.debug("GetAvailableTranslations finished in %s with status %s." % ( info['seconds'], info['status'])) if "data" in info: return info['data'] return False
def _CheckSoftwareUpdates(self, app=None): """Returns latest info on the given application if available """ self.log.debug("----------------") self.log.debug("CheckSoftwareUpdates RPC method starting...") if not app: app = APP_TITLE.lower() try: info = self.xmlrpc_server.CheckSoftwareUpdates(app) except xmlrpclib.ProtocolError as e: self.log.debug("error in HTTP/HTTPS transport layer") raise except xmlrpclib.Fault as e: self.log.debug("error in xml-rpc server") raise except Exception as e: self.log.debug( "Connection to the server failed/other error:%s", sys.exc_info()) raise else: # we have something to show self.log.debug( "Latest SubDownloader Version Found: %s" % info['latest_version']) return info