File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -608,12 +608,12 @@ def create_sbom_for_source_tarball(tarball_path: str) -> SBOM:
608608    # Now we walk the tarball and compare known files to our expected checksums in the SBOM. 
609609    # All files that aren't already in the SBOM can be added as "CPython" files. 
610610    for  member  in  tarball .getmembers ():
611-         if  member .isdir ():  # Skip directories!  
611+         if  not   member .isfile ():  # Only keep files (no symlinks)  
612612            continue 
613613
614614        # Get the member from the tarball. CPython prefixes all of its 
615615        # source code with 'Python-{version}/...'. 
616-         assert  member .isfile ()  and   member . name .startswith (f"Python-{ cpython_version }  )
616+         assert  member .name .startswith (f"Python-{ cpython_version }  )
617617
618618        # Calculate the hashes, either for comparison with a known value 
619619        # or to embed in the SBOM as a new file. SHA1 is only used because 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments