mirror of
https://github.com/varunsridharan/github-gitea-mirror.git
synced 2024-08-17 22:00:35 +03:00
Ensure that an iterable blacklist exists
This commit is contained in:
parent
d3c463782d
commit
9f315504c0
@ -205,7 +205,11 @@ def giteaGetAllUsersOrgs(type):
|
||||
|
||||
|
||||
def isBlacklistedRepository(full_name):
|
||||
for pattern in config['blacklist']:
|
||||
blacklist = config.get('blacklist', [])
|
||||
if isinstance(blacklist, str):
|
||||
blacklist = [blacklist]
|
||||
|
||||
for pattern in blacklist:
|
||||
if fnmatch.fnmatch(full_name, pattern):
|
||||
return True
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user