@@ -52,7 +52,6 @@ class DatasetsCommand(BaseCommand):
5252
5353 def __init__ (self ):
5454 super ().__init__ (Dataset )
55- self .download = Download (env = self .opt ("env" ))
5655
5756 def handler (self ):
5857 self .log .info ("DatasetsCommand.handle()" )
@@ -389,7 +388,7 @@ def _dataset_components_from_uri(
389388 return dataset_id , version , edition
390389
391390 def upload_file (self , source , target ):
392- upload = Upload ()
391+ upload = Upload (env = self . opt ( "env" ) )
393392 dataset_id , version , edition = self ._dataset_components_from_uri (target , True )
394393
395394 self .log .info (f"Will upload file to: { dataset_id } /{ version } /{ edition } )" )
@@ -420,8 +419,9 @@ def upload_file(self, source, target):
420419 self .print ("\n " .join (summary ))
421420
422421 def download_files (self , source , target ):
422+ download = Download (env = self .opt ("env" ))
423423 dataset_id , version , edition = self ._dataset_components_from_uri (source )
424- downloaded_files = self . download .download (
424+ downloaded_files = download .download (
425425 dataset_id , version , edition , resolve_output_filepath (target )
426426 )
427427 self .log .info (f"Download returned: { downloaded_files } " )
0 commit comments