Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Bold
IR_data_access
Commits
58084775
Commit
58084775
authored
Apr 08, 2019
by
Holger Niemann
Browse files
small fix for the closing of connections in get_latest-version#
parent
7bdda71a
Changes
1
Hide whitespace changes
Inline
Side-by-side
downloadversionIRdata.py
View file @
58084775
...
...
@@ -45,6 +45,7 @@ except:
def
get_latest_version
(
stream
,
project
=
"W7X"
,
Test
=
False
,
t_from
=
None
,
t_to
=
None
,
program
=
None
):
"""Find out latest version of given stream
:param stream url stream of interest
:return int of version number of None if non-versioned or non-existing stream
...
...
@@ -75,6 +76,8 @@ def get_latest_version(stream,project="W7X",Test=False,t_from=None,t_to=None,pro
except
urllib
.
error
.
HTTPError
as
ex
:
msg
=
ex
.
read
()
raise
RuntimeError
(
msg
)
else
:
response
.
close
()
# detect unversioned or non-existing stream
if
d
[
"versionInfo"
]
==
[]:
return
None
...
...
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