Skip to content

Commit

Permalink
Merge branch 'master' of github.com:aipescience/uws-client
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Jan 12, 2016
2 parents 51253f5 + 31f16d5 commit 71f3e1d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions uws/UWS/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def get_job_list(self, filters):
try:
response = self.connection.get('', params)
except Exception as e:
# Do not try to make a seconds request without parameters here,
# because cannot call self.connection.get() a second time and reusing the connection
# Do not try to make a second request without parameters here,
# because cannot call self.connection.get() a second time and reusing the connection
# without calling a getresponse() or close() or something beforehand.
# (This would lead to a httplib CannotSendRequest() error!)
# Let's just raise the error immediately.
Expand Down Expand Up @@ -121,11 +121,9 @@ def get_job(self, id, wait=None, phase=None):
try:
response = self.connection.get(id, params)
except:
# TODO: put a warning here that parameters are going to be ignored!
try:
response = self.connection.get(id)
except Exception as e:
raise UWSError(str(e))
# Do not make a second request wihtout params, throw error
# immediately
raise UWSError(str(e))

raw = response.read()
try:
Expand Down

0 comments on commit 71f3e1d

Please sign in to comment.