Skip to content

Commit 71f3e1d

Browse files
committed
Merge branch 'master' of github.com:aipescience/uws-client
2 parents 51253f5 + 31f16d5 commit 71f3e1d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

uws/UWS/client.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def get_job_list(self, filters):
2525
try:
2626
response = self.connection.get('', params)
2727
except Exception as e:
28-
# Do not try to make a seconds request without parameters here,
29-
# because cannot call self.connection.get() a second time and reusing the connection
28+
# Do not try to make a second request without parameters here,
29+
# because cannot call self.connection.get() a second time and reusing the connection
3030
# without calling a getresponse() or close() or something beforehand.
3131
# (This would lead to a httplib CannotSendRequest() error!)
3232
# Let's just raise the error immediately.
@@ -121,11 +121,9 @@ def get_job(self, id, wait=None, phase=None):
121121
try:
122122
response = self.connection.get(id, params)
123123
except:
124-
# TODO: put a warning here that parameters are going to be ignored!
125-
try:
126-
response = self.connection.get(id)
127-
except Exception as e:
128-
raise UWSError(str(e))
124+
# Do not make a second request wihtout params, throw error
125+
# immediately
126+
raise UWSError(str(e))
129127

130128
raw = response.read()
131129
try:

0 commit comments

Comments
 (0)