Skip to content

Commit f694fe6

Browse files
authored
Merge pull request #141 from fosslight/ui
Add dep item in ui result
2 parents 2edd62c + 1ad9bc0 commit f694fe6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ openpyxl
44
progress
55
pyyaml
66
beautifulsoup4
7-
fosslight_util>=2.1.6,<3.0.0
7+
fosslight_util>=2.1.12,<3.0.0
88
fosslight_source>=2.1.4,<3.0.0
99
fosslight_dependency>=4.1.3,<5.0.0
1010
fosslight_binary>=5.1.2,<6.0.0

src/fosslight_scanner/common.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,10 @@ def create_scancodejson(all_scan_item_origin, ui_mode_report, src_path=""):
116116

117117
try:
118118
all_scan_item = copy.deepcopy(all_scan_item_origin)
119-
if FOSSLIGHT_DEPENDENCY in all_scan_item.file_items:
120-
del all_scan_item.file_items[FOSSLIGHT_DEPENDENCY]
121119
if all_scan_item.file_items:
122-
first_sheet = next(iter(all_scan_item.file_items))
123-
else:
120+
first_sheet = next((item for item in all_scan_item.file_items if item != FOSSLIGHT_DEPENDENCY),
121+
None)
122+
if not first_sheet:
124123
first_sheet = FOSSLIGHT_SOURCE
125124
all_scan_item.file_items[first_sheet] = []
126125
if src_path:

0 commit comments

Comments
 (0)