Skip to content

Commit

Permalink
fix(ci): fixup checksum scanning pipeline (mudler#3631)
Browse files Browse the repository at this point in the history
Signed-off-by: Ettore Di Giacinto <[email protected]>
  • Loading branch information
mudler authored Sep 23, 2024
1 parent 4edd8c8 commit 3e8e71f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/check_and_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@ def calculate_sha256(file_path):
def manual_safety_check_hf(repo_id):
scanResponse = requests.get('https://huggingface.co/api/models/' + repo_id + "/scan")
scan = scanResponse.json()
if scan['hasUnsafeFile']:
return scan
return None
# Check if 'hasUnsafeFile' exists in the response
if 'hasUnsafeFile' in scan:
if scan['hasUnsafeFile']:
return scan
else:
return None
else:
return None

download_type, repo_id_or_url = parse_uri(uri)

Expand Down

0 comments on commit 3e8e71f

Please sign in to comment.