diff --git a/util/dashboard/dashboard.py b/util/dashboard/dashboard.py index d83d0d9..d5bc559 100755 --- a/util/dashboard/dashboard.py +++ b/util/dashboard/dashboard.py @@ -397,13 +397,13 @@ def run(): with open(dashboard_yml, 'w+') as f: yaml.dump(data_yml, f) - gateway.detach(robot_gateway) except Exception: logging.exception(f"Creating dashboard for {ontology_file} failed") - try: - gateway.close() - except Exception: - logging.exception("Closing JavaGateway failed") + finally: + try: + gateway.shutdown() + except Exception as e: + logging.exception("Failed to shut down the gateway: %s", e) sys.exit(0)