@@ -1603,14 +1603,17 @@ def pre_process_and_fetch_license_dict(abouts, api_url=None, api_key=None, scanc
16031603 license_text = ''
16041604 spdx_license_key = ''
16051605 detail_list = []
1606+ captured_license .append (lic_key )
16061607 if api_key :
16071608 license_data , errs = api .get_license_details_from_api (url , api_key , lic_key )
1608- license_name = license_data .get ('short_name' , '' )
1609- license_text = license_data .get ('full_text' , '' )
1610- spdx_license_key = license_data .get ('spdx_license_key' , '' )
16111609 for severity , message in errs :
16121610 msg = (about .about_file_path + ": " + message )
16131611 errors .append (Error (severity , msg ))
1612+ if not license_data :
1613+ continue
1614+ license_name = license_data .get ('short_name' , '' )
1615+ license_text = license_data .get ('full_text' , '' )
1616+ spdx_license_key = license_data .get ('spdx_license_key' , '' )
16141617 license_filename = lic_key + '.LICENSE'
16151618 lic_url = lic_urn + lic_key
16161619 else :
@@ -1627,7 +1630,7 @@ def pre_process_and_fetch_license_dict(abouts, api_url=None, api_key=None, scanc
16271630 except :
16281631 msg = about .about_file_path + u" : Invalid 'license': " + lic_key
16291632 errors .append (Error (ERROR , msg ))
1630- captured_license . append ( lic_key )
1633+ continue
16311634 detail_list .append (license_name )
16321635 detail_list .append (license_filename )
16331636 detail_list .append (license_text )
0 commit comments