File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -138,10 +138,11 @@ def download(self) -> None:
138138            filename = "caltech-101.zip" ,
139139            md5 = "3138e1922a9193bfa496528edbbc45d0" ,
140140        )
141-         extracted_dir  =  os .path .join (self .root , "caltech-101" )
142-         extract_archive (os .path .join (extracted_dir , "101_ObjectCategories.tar.gz" ), self .root )
143-         extract_archive (os .path .join (extracted_dir , "Annotations.tar.gz" ), self .root ) # Note: Annotations is now also .tar.gz in the new archive 
144-         shutil .rmtree (extracted_dir )
141+         gzip_folder  =  os .path .join (self .root , "caltech-101" )
142+         for  gzip_file  in  os .listdir (gzip_folder ):
143+             if  gzip_file .endswith (".gz" ):
144+                 extract_archive (os .path .join (gzip_folder , gzip_file ), self .root )
145+         shutil .rmtree (gzip_folder )
145146        os .remove (os .path .join (self .root , "caltech-101.zip" ))
146147
147148
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments