Skip to content

Commit

Permalink
fix bug when no license found
Browse files Browse the repository at this point in the history
  • Loading branch information
karacolada committed Mar 12, 2024
1 parent db9e727 commit bd93a0a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fuji_server/evaluators/fair_evaluator_license_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def testLicenseFileAvailable(self):
if test_defined:
test_score = self.getTestConfigScore(test_id)
parsed_license_file_data = self.fuji.github_data.get("license_file")
if len(parsed_license_file_data) > 0:
if parsed_license_file_data is not None and len(parsed_license_file_data) > 0:
license_file_paths = [lf["path"] for lf in parsed_license_file_data]
test_status = True
self.logger.log(
Expand Down Expand Up @@ -263,7 +263,8 @@ def testLicenseTXTAtRoot(self):
test_score = self.getTestConfigScore(test_id)
license_file_paths = [self.fuji.github_data.get("license_path")]
parsed_license_file_data = self.fuji.github_data.get("license_file")
license_file_paths += [lf["path"] for lf in parsed_license_file_data]
if parsed_license_file_data is not None:
license_file_paths += [lf["path"] for lf in parsed_license_file_data]
for license_path in license_file_paths:
if license_path is not None:
p = Path(license_path)
Expand Down

0 comments on commit bd93a0a

Please sign in to comment.