Skip to content

Commit 4ef0d4d

Browse files
committed
bug fix accessing check_status method
1 parent 2dd9887 commit 4ef0d4d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

hsclient/hydroshare.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,9 +1273,9 @@ def aggregation_move(self, aggregation: Aggregation, dst_path: str = "") -> None
12731273
response = aggregation._hs_session.post(path, status_code=200)
12741274
json_response = response.json()
12751275
task_id = json_response['id']
1276-
status, _ = self.check_task(task_id)
1276+
status, _ = self._hs_session.check_task(task_id)
12771277
while status != 'true':
1278-
status, _ = self.check_task(task_id)
1278+
status, _ = self._hs_session.check_task(task_id)
12791279
time.sleep(CHECK_TASK_PING_INTERVAL)
12801280
aggregation.refresh()
12811281

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

0 commit comments

Comments
 (0)