mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2026-01-25 14:43:09 +01:00
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.
This commit is contained in:
@@ -1814,7 +1814,7 @@ def backup_repositories(args, output_directory, repositories):
|
||||
if args.include_milestones or args.include_everything:
|
||||
backup_milestones(args, repo_cwd, repository, repos_template)
|
||||
|
||||
if args.include_security_advisories or (args.include_everything and not repository["Private"]):
|
||||
if args.include_security_advisories or (args.include_everything and not repository.get("private", False)):
|
||||
backup_security_advisories(args, repo_cwd, repository, repos_template)
|
||||
|
||||
if args.include_labels or args.include_everything:
|
||||
|
||||
Reference in New Issue
Block a user