Skip to content

Commit 93e505c

Browse files
committed
fix: Handle 404 errors on security advisories
1 parent 6780d3a commit 93e505c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

github_backup/github_backup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2045,7 +2045,13 @@ def backup_security_advisories(args, repo_cwd, repository, repos_template):
20452045
repos_template, repository["full_name"]
20462046
)
20472047

2048-
_advisories = retrieve_data(args, template)
2048+
try:
2049+
_advisories = retrieve_data(args, template)
2050+
except Exception as e:
2051+
if "404" in str(e):
2052+
logger.info("Security advisories are not available for this repository, skipping")
2053+
return
2054+
raise
20492055

20502056
advisories = {}
20512057
for advisory in _advisories:

0 commit comments

Comments
 (0)