From 2c2dcaa67dc57a43b19497b11c58c9b01f1c8057 Mon Sep 17 00:00:00 2001 From: Jesper Baasch-Larsen Date: Thu, 5 Dec 2019 09:27:47 +0100 Subject: FEATURE_SEPARATE_RETRIEVE_DOWNLOAD: request_id as optional argument to update method --- cdsapi/api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cdsapi') diff --git a/cdsapi/api.py b/cdsapi/api.py index fb0b59d..16cbcaf 100644 --- a/cdsapi/api.py +++ b/cdsapi/api.py @@ -116,8 +116,10 @@ class Result(object): self.debug(metadata.headers) return metadata - def update(self): - task_url = '%s/tasks/%s' % (self._url, self.reply['request_id']) + def update(self, request_id=None): + if request_id is None: + request_id = self.reply['request_id'] + task_url = '%s/tasks/%s' % (self._url, request_id) self.debug("GET %s", task_url) result = self.robust(self.session.get)(task_url, verify=self.verify) -- cgit v1.2.3