From 17141c1bb6d2736ff71f849784326fbca71f0c6f Mon Sep 17 00:00:00 2001 From: Albert Wang Date: Fri, 29 Jan 2016 00:20:53 -0800 Subject: [PATCH] Softly fail if not able to read hooks --- bin/github-backup | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/github-backup b/bin/github-backup index cc469f8..e811b27 100755 --- a/bin/github-backup +++ b/bin/github-backup @@ -598,11 +598,14 @@ def backup_hooks(args, repo_cwd, repository, repos_template): output_file = '{0}/hooks.json'.format(hook_cwd) template = '{0}/{1}/hooks'.format(repos_template, repository['full_name']) - _backup_data(args, - 'hooks', - template, - output_file, - hook_cwd) + try: + _backup_data(args, + 'hooks', + template, + output_file, + hook_cwd) + except SystemExit: + log_info("Unable to read hooks, skipping") def fetch_repository(name, remote_url, local_dir, skip_existing=False):