Skip to content

Commit 0d8a504

Browse files
committed
Fix KeyError: 'Private' when using --all flag (#481)
The repository dictionary uses lowercase "private" key. Use .get() with the correct case to match the pattern used elsewhere in the codebase. The bug only affects --all users since --security-advisories short-circuits before the key access.
1 parent 712d22d commit 0d8a504

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github_backup/github_backup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,7 @@ def backup_repositories(args, output_directory, repositories):
18141814
if args.include_milestones or args.include_everything:
18151815
backup_milestones(args, repo_cwd, repository, repos_template)
18161816

1817-
if args.include_security_advisories or (args.include_everything and not repository["Private"]):
1817+
if args.include_security_advisories or (args.include_everything and not repository.get("private", False)):
18181818
backup_security_advisories(args, repo_cwd, repository, repos_template)
18191819

18201820
if args.include_labels or args.include_everything:

0 commit comments

Comments
 (0)