Skip to content

Commit

Permalink
KeyError fix with gists
Browse files Browse the repository at this point in the history
  • Loading branch information
John Doe committed Sep 22, 2024
1 parent 871d69b commit 53f6650
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions github_backup/github_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,11 +931,11 @@ def filter_repositories(args, unfiltered_repositories):
if r.get("language") and r.get("language").lower() in languages
] # noqa
if name_regex:
repositories = [r for r in repositories if name_regex.match(r["name"])]
repositories = [r for r in repositories if "name" not in r or name_regex.match(r["name"])]
if args.skip_archived:
repositories = [r for r in repositories if not r.get("archived")]
if args.exclude:
repositories = [r for r in repositories if r["name"] not in args.exclude]
repositories = [r for r in repositories if "name" not in r or r["name"] not in args.exclude]

return repositories

Expand Down

0 comments on commit 53f6650

Please sign in to comment.