Commit 173a4bc6 authored by tsanona's avatar tsanona

Mr corrections

parent 6df4efe5
Pipeline #16074 passed with stages
in 23 minutes and 37 seconds
...@@ -795,21 +795,21 @@ def client(outpath="", out_prefix="", out_mode="json", geo_ll=(), geo_ur=(), sen ...@@ -795,21 +795,21 @@ def client(outpath="", out_prefix="", out_mode="json", geo_ll=(), geo_ur=(), sen
"onlytime": onlytime, "timeout": timeout} "onlytime": onlytime, "timeout": timeout}
# actual API request # actual API request
logger.info(msg="Requesting data from the GTS2 server ...") logger.info("Requesting data from the GTS2 server ...")
a_stime = time.time() a_stime = time.time()
api_result = Gts2Request(opts, logger=logger) api_result = Gts2Request(opts, logger=logger)
a_runtime = time.time() - a_stime a_runtime = time.time() - a_stime
logger.info(">>>>>> Runtime of API: %7.2f minutes" % (a_runtime / 60.)) logger.info(">>>>>> Runtime of API: %7.2f minutes" % (a_runtime / 60.))
if api_result["http_code"] >= 400:
logger.error("##################")
raise ChildProcessError("API call not right or server Problem (http_code={code}).".format(
code=api_result["http_code"]))
if "ControlValues" in api_result and api_result["ControlValues"]["API_status"] == 1: if "ControlValues" in api_result and api_result["ControlValues"]["API_status"] == 1:
logger.error("##################") logger.error("##################")
logger.error(str(api_result["ControlValues"]["API_message"])) logger.error(str(api_result["ControlValues"]["API_message"]))
raise ChildProcessError("Something went wrong on GTS2 Server (http_code={code}).".format( raise ChildProcessError("Something went wrong on GTS2 Server (http_code={code}).".format(
code=api_result["http_code"])) code=api_result["http_code"]))
if api_result["http_code"] >= 400:
logger.error("##################")
raise ChildProcessError("API call not right or server Problem (http_code={code}).".format(
code=api_result["http_code"]))
if only_tile != "": if only_tile != "":
requ_tiles = api_result['Results'].keys() requ_tiles = api_result['Results'].keys()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment