Remove list(dict.items()) -- >dict.items()

This commit is contained in:
JonnyWong16 2020-03-21 18:31:55 -07:00
parent 2b0e7daf7c
commit ad112e0a44
12 changed files with 38 additions and 38 deletions

View file

@ -62,7 +62,7 @@ def blacklist_config(config):
blacklist = set()
blacklist_keys = ['HOOK', 'APIKEY', 'KEY', 'PASSWORD', 'TOKEN']
for key, value in list(config.items()):
for key, value in config.items():
if isinstance(value, basestring) and len(value.strip()) > 5 and \
key.upper() not in _WHITELIST_KEYS and (key.upper() in blacklist_keys or
any(bk in key.upper() for bk in _BLACKLIST_KEYS)):