Skip to content

Commit bfdaebb

Browse files
authored
Merge pull request #140 from fosslight/ui
Fix ui mode error when analyzing only dependency
2 parents 6301fca + b419575 commit bfdaebb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/fosslight_scanner/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,11 @@ def create_scancodejson(all_scan_item_origin, ui_mode_report, src_path=""):
118118
all_scan_item = copy.deepcopy(all_scan_item_origin)
119119
if FOSSLIGHT_DEPENDENCY in all_scan_item.file_items:
120120
del all_scan_item.file_items[FOSSLIGHT_DEPENDENCY]
121-
first_sheet = FOSSLIGHT_SOURCE
122121
if all_scan_item.file_items:
123122
first_sheet = next(iter(all_scan_item.file_items))
123+
else:
124+
first_sheet = FOSSLIGHT_SOURCE
125+
all_scan_item.file_items[first_sheet] = []
124126
if src_path:
125127
fileitems_without_oss = []
126128
for root, _, files in os.walk(src_path):

0 commit comments

Comments
 (0)