@@ -27,7 +27,7 @@ class ScanItem:
2727    is_license_text  =  False 
2828    oss_name  =  "" 
2929    oss_version  =  "" 
30-     download_location  =  "" 
30+     download_location  =  [] 
3131    matched_lines  =  ""   # Only for SCANOSS results 
3232    fileURL  =  ""   # Only for SCANOSS results 
3333    license_reference  =  "" 
@@ -70,18 +70,38 @@ def get_row_to_print(self):
7070        print_rows  =  [self .file , self .oss_name , self .oss_version , ',' .join (self .licenses ),
7171                      self .download_location , "" , ',' .join (self .copyright ),
7272                      "Exclude"  if  self .exclude  else  "" , self .comment ]
73+         print_rows  =  []
74+         if  not  self .download_location :
75+             print_rows .append ([self .file , self .oss_name , self .oss_version , ',' .join (self .licenses ),
76+                                "" , "" , ',' .join (self .copyright ), "Exclude"  if  self .exclude  else  "" , self .comment ])
77+         else :
78+             for  url  in  self .download_location :
79+                 print_rows .append ([self .file , self .oss_name , self .oss_version , ',' .join (self .licenses ),
80+                                    url , "" , ',' .join (self .copyright ), "Exclude"  if  self .exclude  else  "" , self .comment ])
7381        return  print_rows 
7482
7583    def  get_row_to_print_for_scanoss (self ):
76-         print_rows  =  [self .file , self .oss_name , self .oss_version , ',' .join (self .licenses ), self .download_location , "" ,
77-                       ',' .join (self .copyright ),
78-                       "Exclude"  if  self .exclude  else  "" , self .comment ]
84+         print_rows  =  []
85+         if  not  self .download_location :
86+             print_rows .append ([self .file , self .oss_name , self .oss_version , ',' .join (self .licenses ), "" , "" ,
87+                                ',' .join (self .copyright ), "Exclude"  if  self .exclude  else  "" , self .comment ])
88+         else :
89+             for  url  in  self .download_location :
90+                 print_rows .append ([self .file , self .oss_name , self .oss_version , ',' .join (self .licenses ), url , "" ,
91+                                    ',' .join (self .copyright ), "Exclude"  if  self .exclude  else  "" , self .comment ])
7992        return  print_rows 
8093
8194    def  get_row_to_print_for_all_scanner (self ):
82-         print_rows  =  [self .file , self .oss_name , self .oss_version , ',' .join (self .licenses ), self .download_location , "" ,
83-                       ',' .join (self .copyright ),
84-                       "Exclude"  if  self .exclude  else  "" , self .comment , self .license_reference ]
95+         print_rows  =  []
96+         if  not  self .download_location :
97+             print_rows .append ([self .file , self .oss_name , self .oss_version , ',' .join (self .licenses ), "" , "" ,
98+                                ',' .join (self .copyright ), "Exclude"  if  self .exclude  else  "" , self .comment ,
99+                                self .license_reference ])
100+         else :
101+             for  url  in  self .download_location :
102+                 print_rows .append ([self .file , self .oss_name , self .oss_version , ',' .join (self .licenses ), url , "" ,
103+                                    ',' .join (self .copyright ), "Exclude"  if  self .exclude  else  "" , self .comment ,
104+                                    self .license_reference ])
85105        return  print_rows 
86106
87107    def  merge_scan_item (self , other ):
@@ -106,7 +126,7 @@ def merge_scan_item(self, other):
106126        if  not  self .oss_version :
107127            self .oss_version  =  other .oss_version 
108128        if  not  self .download_location :
109-             self .download_location  =  other .download_location 
129+             self .download_location  =  list ( other .download_location ) 
110130        if  not  self .matched_lines :
111131            self .matched_lines  =  other .matched_lines 
112132        if  not  self .fileURL :
0 commit comments