Skip to content

Commit

Permalink
bug fix accessing check_status method
Browse files Browse the repository at this point in the history
  • Loading branch information
sblack-usu committed Feb 7, 2025
1 parent 2dd9887 commit 4ef0d4d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hsclient/hydroshare.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,9 +1273,9 @@ def aggregation_move(self, aggregation: Aggregation, dst_path: str = "") -> None
response = aggregation._hs_session.post(path, status_code=200)
json_response = response.json()
task_id = json_response['id']
status, _ = self.check_task(task_id)
status, _ = self._hs_session.check_task(task_id)
while status != 'true':
status, _ = self.check_task(task_id)
status, _ = self._hs_session.check_task(task_id)
time.sleep(CHECK_TASK_PING_INTERVAL)
aggregation.refresh()

Expand Down Expand Up @@ -1395,7 +1395,6 @@ def retrieve_zip(self, path, save_path="", params=None):
"Failed GET {}, status_code {}, message {}".format(url, response.status_code, response.content)
)
filename = path.split("/")[-1]
filename += ".zip" if not filename.endswith(".zip") else ""
downloaded_file = os.path.join(save_path, filename)
with open(downloaded_file, 'wb') as f:
f.write(response.content)
Expand Down

0 comments on commit 4ef0d4d

Please sign in to comment.