Skip to content

Commit 993a066

Browse files
committed
Add severity level for error
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 933063a commit 993a066

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/attributecode/model.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ def dump_lic(self, location, license_dict):
12981298
with io.open(license_path, mode='w', encoding='utf-8', newline='\n', errors='replace') as lic:
12991299
lic.write(license_context)
13001300
except Exception as e:
1301-
err = str(e)
1301+
err = Error(ERROR, 'Invalid license: ' + str(e))
13021302

13031303
return license_key_name_context_url, err
13041304

@@ -1605,6 +1605,8 @@ def pre_process_and_fetch_license_dict(abouts, api_url=None, api_key=None, scanc
16051605
Return a dictionary containing the license information (key, name, text, url)
16061606
fetched from the ScanCode LicenseDB or DejaCode API.
16071607
"""
1608+
print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
1609+
print(abouts)
16081610
key_text_dict = {}
16091611
captured_license = []
16101612
errors = []
@@ -1697,6 +1699,9 @@ def pre_process_and_fetch_license_dict(abouts, api_url=None, api_key=None, scanc
16971699
key_text_dict[lic_key] = detail_list
16981700
if not about.license_key.value:
16991701
about.license_key.value = lic_list
1702+
print("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")
1703+
print(key_text_dict)
1704+
print(errors)
17001705
return key_text_dict, errors
17011706

17021707

0 commit comments

Comments
 (0)