Skip to content

Commit

Permalink
fix bugs with check
Browse files Browse the repository at this point in the history
  • Loading branch information
sjledoux committed May 7, 2024
1 parent e5b0295 commit 32808ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rws-submissions-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
message-path: "message.txt"
refresh-message-position: true
- name: Fail or Succeed
if: steps.read_results.outputs.contents != 'success'
if: startsWith(steps.read_results.outputs.contents, 'It appears you have failed')
uses: actions/github-script@v3
with:
script: |
Expand Down
4 changes: 2 additions & 2 deletions RwsCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, rws_sites: json, etlds: PublicSuffixList, icanns: set):
self.etlds = etlds
self.icanns = icanns
self.error_list = []
self.associated_warning = []
self.warning_texts = []

def validate_schema(self, schema_file):
"""Validates the canonical sites list
Expand Down Expand Up @@ -185,7 +185,7 @@ def check_associated_count(self, check_sets):
"""
for primary, rws in check_sets.items():
if len(rws.associated_sites) > ASSOCIATED_LIMIT:
self.associated_warning.append(
self.warning_texts.append(
f"Warning: the set for {primary} contains more than {ASSOCIATED_LIMIT} associated sites."
)

Expand Down
5 changes: 2 additions & 3 deletions check_sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,12 @@ def main():
except Exception as inst:
error_texts.append(inst)
# This message allows us to check the succes of our action
if rws_checker.error_list or error_texts:
if rws_checker.error_list or error_texts or rws_checker.warning_texts:
for checker_error in rws_checker.error_list:
print(checker_error)
for error_text in error_texts:
print(error_text)
elif rws_checker.associated_warning:
for warning in rws_checker.associated_warning:
for warning in rws_checker.warning_texts:
print(warning)
else:
print("success", end='')
Expand Down

0 comments on commit 32808ea

Please sign in to comment.