diff --git a/backup_github/backup.py b/backup_github/backup.py index 5445b38..d98e6ec 100644 --- a/backup_github/backup.py +++ b/backup_github/backup.py @@ -114,7 +114,9 @@ def __save_repo_content(self, repository, dir): subprocess.call, ["git", "clone", "--bare", repo_url] ) if not os.path.exists(f"{repository}.git"): - raise subprocess.CalledProcessError + raise subprocess.CalledProcessError( + 1, ["git", "clone", "--bare", repo_url] + ) except subprocess.CalledProcessError: shutil.rmtree(f"{dir}/{repository}") logging.error(f"Repository {repository} backup error, will be skipped")