Skip to content

Commit cd3b84d

Browse files
Fix summary bug without holders #3109
- Fix bug where we were looking for holders in resources without checking if the copyright option was enabled. - Added a test case that was failing without the fix, same as the reported bug. Reference: #3109 Reported-by: https://github.com/bwjohnson-ss Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent 6007301 commit cd3b84d

File tree

16 files changed

+5538
-0
lines changed

16 files changed

+5538
-0
lines changed

src/summarycode/summarizer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ def get_origin_info_from_top_level_packages(top_level_packages, codebase):
270270
key_file_resource = codebase.get_resource(path=datafile_path)
271271
if not key_file_resource:
272272
continue
273+
274+
if not hasattr(key_file_resource, 'holders'):
275+
break
276+
273277
holders = [h['holder'] for h in key_file_resource.holders]
274278
declared_holders.extend(holders)
275279
# Normalize holder names before collecting them

0 commit comments

Comments
 (0)