Skip to content

Commit

Permalink
Merge pull request #345 from xloem/exclude_keyerror
Browse files Browse the repository at this point in the history
KeyError fix with gists
  • Loading branch information
josegonzalez committed Sep 22, 2024
2 parents 871d69b + 53f6650 commit 6ca8030
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 6ca8030

Please sign in to comment.