Skip to content

Commit 7a6d03e

Browse files
committed
Do not fail on license
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent bd7eac4 commit 7a6d03e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/licensedcode/required_phrases.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,11 @@ def generate_new_required_phrase_rules(
939939
# check if we already have a rule we can match for this required phrase tag if needed
940940
matched_rule = rule_exists(text=phrase.raw_text)
941941
if matched_rule:
942+
if matched_rule.is_from_license:
943+
if TRACE and verbose:
944+
click.echo(f'Skipping rule matched to license: {matched_rule.identifier}.')
945+
continue
946+
942947
actual_rule = current_rules_by_identifier[matched_rule.identifier]
943948
if actual_rule.skip_for_required_phrase_generation:
944949
if TRACE and verbose:
@@ -954,6 +959,8 @@ def generate_new_required_phrase_rules(
954959
# this combo does not work, make it a reference
955960
if actual_rule.is_license_intro or actual_rule.is_license_clue:
956961
actual_rule.is_license_reference = True
962+
actual_rule.is_license_intro = False
963+
actual_rule.is_license_clue = False
957964
actual_rule.is_required_phrase = True
958965
modified = True
959966

0 commit comments

Comments
 (0)