Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
gts2
gts2_client
Commits
173a4bc6
Commit
173a4bc6
authored
Nov 26, 2020
by
tsanona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mr corrections
parent
6df4efe5
Pipeline
#16074
passed with stages
in 23 minutes and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
gts2_client/gts2_client.py
gts2_client/gts2_client.py
+5
-5
No files found.
gts2_client/gts2_client.py
View file @
173a4bc6
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment