From bddf6a3e9b3bbd11a5642e654d0a3c327a78cfa2 Mon Sep 17 00:00:00 2001 From: Soim Date: Mon, 14 Aug 2023 13:30:54 +0900 Subject: [PATCH] Fix the bug when nothing is detected --- src/fosslight_source/_parsing_scancode_file_item.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fosslight_source/_parsing_scancode_file_item.py b/src/fosslight_source/_parsing_scancode_file_item.py index 582432b..5fd6cdc 100755 --- a/src/fosslight_source/_parsing_scancode_file_item.py +++ b/src/fosslight_source/_parsing_scancode_file_item.py @@ -300,7 +300,7 @@ def parsing_file_item(scancode_file_list, has_error, path_to_scan, need_matched_ rc = True msg = [] - first_item = next(iter(scancode_file_list or []), None) + first_item = next(iter(scancode_file_list or []), {}) if "licenses" in first_item: rc, scancode_file_item, msg, license_list = parsing_scancode_32_earlier(scancode_file_list, path_to_scan, has_error)