Skip to content

Commit c0c6bd6

Browse files
committed
Properly combine scan data #1439
Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent 07e33f6 commit c0c6bd6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/scancode/resource.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,10 +1406,12 @@ def _get_scan_data(self, location):
14061406
if isinstance(location, dict):
14071407
return location
14081408
if isinstance(location, (list, tuple,)):
1409-
scan_data = OrderedDict()
1409+
combined_scan_data = OrderedDict(headers=[], files=[])
14101410
for loc in location:
1411-
scan_data.update(self._get_scan_data_helper(loc))
1412-
return scan_data
1411+
scan_data = self._get_scan_data_helper(loc)
1412+
combined_scan_data['headers'].extend(scan_data['headers'])
1413+
combined_scan_data['files'].extend(scan_data['files'])
1414+
return combined_scan_data
14131415
return self._get_scan_data_helper(location)
14141416

14151417
def _create_empty_resource_data(self):

0 commit comments

Comments
 (0)