def refresh_databases_start(self, host, port): dbs = None try: dbs = rpc.db_list(host, port) except Exception: pass finally: self.dbs = dbs self.dbs_updated.set()
def refresh_dblist(host, port): ''' Return the number of database available or None if it is impossible to connect or -1 if the server version doesn't match the client version ''' rpc.logout() if not test_server_version(host, port): return -1 return rpc.db_list(host, port)