Skip to content

Commit b855bca

Browse files
authored
Merge pull request #238 from mofe23/master
Fix 404 on hooks
2 parents a97f15b + 42b836f commit b855bca

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

github_backup/github_backup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,8 +1189,11 @@ def backup_hooks(args, repo_cwd, repository, repos_template):
11891189
template = "{0}/{1}/hooks".format(repos_template, repository["full_name"])
11901190
try:
11911191
_backup_data(args, "hooks", template, output_file, hook_cwd)
1192-
except SystemExit:
1193-
logger.info("Unable to read hooks, skipping")
1192+
except Exception as e:
1193+
if "404" in str(e):
1194+
logger.info("Unable to read hooks, skipping")
1195+
else:
1196+
raise e
11941197

11951198

11961199
def backup_releases(args, repo_cwd, repository, repos_template, include_assets=False):

0 commit comments

Comments
 (0)