Skip to content

Commit 4217c71

Browse files
authored
Merge pull request #54 from fosslight/develop
Fix the opossum result to print the multiple resourcesToAttribution
2 parents 570fcd7 + 4d3e0a5 commit 4217c71

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/fosslight_util/write_opossum.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,10 @@ def make_resources_and_attributions(sheet_items, scanner, resources, fc_list):
300300

301301
uuid_list = []
302302
uuid_list.append(str(uuid))
303-
resourcesToAttributions[os.path.join(os.sep, path)] = uuid_list
303+
if os.path.join(os.sep, path) in resourcesToAttributions:
304+
resourcesToAttributions[os.path.join(os.sep, path)].extend(uuid_list)
305+
else:
306+
resourcesToAttributions[os.path.join(os.sep, path)] = uuid_list
304307

305308
for ext in externalAttribution_list:
306309
externalAttributions[str(ext.uuid)] = ext

tests/test_opossum.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ def main():
1313
sheet_list = {'SRC_FL_Source': [
1414
['test/lib/babel-polyfill.js', '', '', 'bsd-3-clause,facebook-patent-rights-2', '', '',
1515
'Copyright (c) 2014, Facebook, Inc.', 'Exclude', ''],
16+
['lib/babel-polyfill.js', '', '', 'bsd-3-clause', '', '',
17+
'Copyright (c) 2014, Facebook, Inc.', '', ''],
18+
['lib/babel-polyfill.js', '', '', 'facebook-patent-rights-2', '', '',
19+
'Copyright (c) 2014, Facebook, Inc.', '', ''],
1620
['requirements.txt', '', '', 'MIT', 'https://pypi.org/project/future/0.18.2', '', '', '', ''],
1721
['bower.json', '', '', 'mit', '', '', '', '', ''],
1822
['LICENSE', '', '', 'mit', '', '', 'Copyright (c) 2016-2021, The Cytoscape Consortium', '', ''],

0 commit comments

Comments
 (0)