From 31daf00839ca6c09d616a3dee9e8bb4bb4035b70 Mon Sep 17 00:00:00 2001 From: lakhoune Date: Mon, 26 Feb 2024 21:30:13 +0100 Subject: [PATCH] raise value error if bot manager url is missing --- utils/api_requests.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/utils/api_requests.py b/utils/api_requests.py index 99eaa8e..9e4b97c 100644 --- a/utils/api_requests.py +++ b/utils/api_requests.py @@ -21,11 +21,9 @@ def fetch_bot_model(name, endpoint="https://mobsos.tech4comp.dbis.rwth-aachen.de def fetch_event_log(bot_name, url=None, botManagerUrl=None): if url is None: - url = f"https://mobsos.tech4comp.dbis.rwth-aachen.de/event-log" - print("No url provided, using default url") + raise ValueError("event log url must be set") if botManagerUrl is None: - botManagerUrl = f"https://mobsos.tech4comp.dbis.rwth-aachen.de/SBFManager" - print("No bot manager url provided, using default url") + raise ValueError("botManagerUrl must be set") resource_ids = get_resource_ids_from_bot_manager(botManagerUrl, bot_name) response = r.post(f"{url}/resources", json={"resource_ids": resource_ids}) # response is xml, use pm4py to parse it