From eb71d6eddf4cae21a6ae9bc96f6a97fd6515bd65 Mon Sep 17 00:00:00 2001 From: Michael McAuliffe Date: Thu, 14 Nov 2019 14:12:06 -0700 Subject: [PATCH] FIx for running SPADE scripts against pgdb utility --- polyglotdb/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/polyglotdb/utils.py b/polyglotdb/utils.py index 879c12d5..f87f73bd 100755 --- a/polyglotdb/utils.py +++ b/polyglotdb/utils.py @@ -51,12 +51,11 @@ def ensure_local_database_running(database_name, port=8080, token=None, ip="loca host = 'http://{}:{}'.format(ip, port) client = PGDBClient(host, token=token) - databases = client.list_databases() - try: response = client.create_database(database_name) except (ClientError, ConnectionError): pass + try: client.start_database(database_name) except (ClientError, ConnectionError): @@ -68,7 +67,7 @@ def ensure_local_database_running(database_name, port=8080, token=None, ip="loca db_info['host'] = ip pgdb = False except ConnectionError: - print('Warning: no Polyglot server available locally, using default ports.') + print('Warning: no ISCAN server available locally, using default ports.') db_info = {'graph_http_port': 7474, 'graph_bolt_port': 7687, 'acoustic_http_port': 8086, 'host': ip} pgdb = True