File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -271,20 +271,20 @@ def download(
271271 )
272272
273273 urls = details .get ("urls" )
274- if urls :
275- url = urls . get ( "https" )
276- if not url :
277- raise ValueError (
278- f"Cannot download { filename } over HTTPS "
279- "('download' delivery is not available for this job)." ,
280- )
281- else :
282- # Handle legacy manifest.json without the 'urls' field
283- base_url = "https://api.databento.com/v0/batch/ download"
284- url = f" { base_url } / { job_id } / { filename } "
274+ if not urls :
275+ raise ValueError (
276+ f"Cannot download { filename } , URLs were not found in manifest." ,
277+ )
278+
279+ https_url = urls . get ( "https" )
280+ if not https_url :
281+ raise ValueError (
282+ f"Cannot download { filename } over HTTPS, "
283+ "' download' delivery is not available for this job." ,
284+ )
285285
286286 self ._download_file (
287- url = url ,
287+ url = https_url ,
288288 filesize = int (details ["size" ]),
289289 output_path = output_path ,
290290 )
You can’t perform that action at this time.
0 commit comments