fosslight-scanner 2.1.5__py3-none-any.whl → 2.1.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fosslight_scanner/common.py +9 -7
- fosslight_scanner/fosslight_scanner.py +3 -1
- {fosslight_scanner-2.1.5.dist-info → fosslight_scanner-2.1.7.dist-info}/METADATA +1 -1
- {fosslight_scanner-2.1.5.dist-info → fosslight_scanner-2.1.7.dist-info}/RECORD +8 -8
- {fosslight_scanner-2.1.5.dist-info → fosslight_scanner-2.1.7.dist-info}/LICENSE +0 -0
- {fosslight_scanner-2.1.5.dist-info → fosslight_scanner-2.1.7.dist-info}/WHEEL +0 -0
- {fosslight_scanner-2.1.5.dist-info → fosslight_scanner-2.1.7.dist-info}/entry_points.txt +0 -0
- {fosslight_scanner-2.1.5.dist-info → fosslight_scanner-2.1.7.dist-info}/top_level.txt +0 -0
fosslight_scanner/common.py
CHANGED
|
@@ -8,6 +8,7 @@ import sys
|
|
|
8
8
|
import logging
|
|
9
9
|
import shutil
|
|
10
10
|
import copy
|
|
11
|
+
import traceback
|
|
11
12
|
from fosslight_util.constant import LOGGER_NAME, FOSSLIGHT_SOURCE, FOSSLIGHT_BINARY, FOSSLIGHT_DEPENDENCY
|
|
12
13
|
from fosslight_util.write_scancodejson import write_scancodejson
|
|
13
14
|
from fosslight_util.oss_item import OssItem, FileItem
|
|
@@ -177,7 +178,10 @@ def correct_scanner_result(all_scan_item):
|
|
|
177
178
|
bin_empty_license_exists = all(not oss_item.license for oss_item in bin_fileitem.oss_items)
|
|
178
179
|
|
|
179
180
|
if src_all_licenses_non_empty and bin_empty_license_exists:
|
|
180
|
-
|
|
181
|
+
if bin_fileitem.oss_items:
|
|
182
|
+
exclude = bin_fileitem.oss_items[0].exclude
|
|
183
|
+
else:
|
|
184
|
+
exclude = False
|
|
181
185
|
bin_fileitem.oss_items = []
|
|
182
186
|
for src_oss_item in src_fileitem.oss_items:
|
|
183
187
|
src_oss_item.exclude = exclude
|
|
@@ -190,13 +194,11 @@ def correct_scanner_result(all_scan_item):
|
|
|
190
194
|
for i in sorted(remove_src_idx_list, reverse=True):
|
|
191
195
|
del src_fileitems[i]
|
|
192
196
|
except Exception as ex:
|
|
193
|
-
logger.warning(f"correct the scanner result:{ex}")
|
|
197
|
+
logger.warning(f"Fail to correct the scanner result:{ex}")
|
|
198
|
+
logger.warning(traceback.format_exc())
|
|
194
199
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
logger.info('Success to correct the src/bin scanner result')
|
|
198
|
-
except Exception as ex:
|
|
199
|
-
logger.warning(f"Corrected src/bin scanner result:{ex}")
|
|
200
|
+
if duplicates:
|
|
201
|
+
logger.info('Success to correct the src/bin scanner result')
|
|
200
202
|
return all_scan_item
|
|
201
203
|
|
|
202
204
|
|
|
@@ -43,6 +43,7 @@ except ModuleNotFoundError:
|
|
|
43
43
|
fosslight_source_installed = False
|
|
44
44
|
|
|
45
45
|
OUTPUT_REPORT_PREFIX = "fosslight_report_all_"
|
|
46
|
+
COMPARE_OUTPUT_REPORT_PREFIX = "fosslight_compare_"
|
|
46
47
|
PKG_NAME = "fosslight_scanner"
|
|
47
48
|
logger = logging.getLogger(constant.LOGGER_NAME)
|
|
48
49
|
warnings.simplefilter(action='ignore', category=FutureWarning)
|
|
@@ -426,7 +427,8 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format
|
|
|
426
427
|
logger.error("(compare mode) Cannot find after FOSSLight report file (2nd param with -y option).")
|
|
427
428
|
return False
|
|
428
429
|
ret, final_excel_dir, result_log = init(output_path)
|
|
429
|
-
|
|
430
|
+
if not output_files:
|
|
431
|
+
output_files = [COMPARE_OUTPUT_REPORT_PREFIX + _start_time]
|
|
430
432
|
run_compare(os.path.join(_executed_path, before_comp_f), os.path.join(_executed_path, after_comp_f),
|
|
431
433
|
final_excel_dir, output_files, output_extensions, _start_time, _output_dir)
|
|
432
434
|
else:
|
|
@@ -4,12 +4,12 @@ fosslight_scanner/_help.py,sha256=-Dqgn1inH26614GjrIe8I5cdEziuAxTtwrUdtTkrpjQ,30
|
|
|
4
4
|
fosslight_scanner/_parse_setting.py,sha256=SoIEoPGlFXAp6__eEFEMIPYPoKLvmqxXF5X_C_uFiVI,2468
|
|
5
5
|
fosslight_scanner/_run_compare.py,sha256=zmzX-FIvWCSkwPvEA3iHfVpyg6QDGUCpw3tJuGLdPWM,10657
|
|
6
6
|
fosslight_scanner/cli.py,sha256=C4YNPVJJ-Ezj_6xe8k9QbIrf5V44GXbHWCGzR2FMcV8,6547
|
|
7
|
-
fosslight_scanner/common.py,sha256=
|
|
8
|
-
fosslight_scanner/fosslight_scanner.py,sha256=
|
|
7
|
+
fosslight_scanner/common.py,sha256=0LgXlGOJVB0kDeZ-1VeHEErArh7TgXkwEAmYAL9q93I,8465
|
|
8
|
+
fosslight_scanner/fosslight_scanner.py,sha256=MIjKJ_HHyKKlh3HhuTtuezxTmX9guDWYDgjdXZP3IPU,21001
|
|
9
9
|
fosslight_scanner/resources/bom_compare.html,sha256=VocJ9bDmQQOwfGyvXatPZ4W-QddO-IlsAvKdO0nZ7pA,2240
|
|
10
|
-
fosslight_scanner-2.1.
|
|
11
|
-
fosslight_scanner-2.1.
|
|
12
|
-
fosslight_scanner-2.1.
|
|
13
|
-
fosslight_scanner-2.1.
|
|
14
|
-
fosslight_scanner-2.1.
|
|
15
|
-
fosslight_scanner-2.1.
|
|
10
|
+
fosslight_scanner-2.1.7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
11
|
+
fosslight_scanner-2.1.7.dist-info/METADATA,sha256=TCITJqWRZ5MZd8Xb7YccX6Ps_YZcjnjH77YhfY1KiCY,7873
|
|
12
|
+
fosslight_scanner-2.1.7.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
13
|
+
fosslight_scanner-2.1.7.dist-info/entry_points.txt,sha256=0tBUtN9pKtAkuohQuhbzuohdHbeoI0-w95aWAR7J_RU,105
|
|
14
|
+
fosslight_scanner-2.1.7.dist-info/top_level.txt,sha256=43_xLb5KYpy8wOU1H2Wd2fEsWBY7Dg6ZEJJXkfT64Ak,18
|
|
15
|
+
fosslight_scanner-2.1.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|