RSS: Fix shadowing of any/all.

This commit is contained in:
Valentin Lorentz 2016-09-20 22:54:11 +02:00
parent 79bcc04d0a
commit d39647142c

View File

@ -384,6 +384,11 @@ class RSS(callbacks.Plugin):
def should_send_entry(self, channel, entry): def should_send_entry(self, channel, entry):
whitelist = self.registryValue('keywordWhitelist', channel) whitelist = self.registryValue('keywordWhitelist', channel)
blacklist = self.registryValue('keywordBlacklist', channel) blacklist = self.registryValue('keywordBlacklist', channel)
# fix shadowing by “from supybot.commands import *”
all = __builtins__.all
any = __builtins__.any
if whitelist: if whitelist:
if all(kw not in entry.title and kw not in entry.description if all(kw not in entry.title and kw not in entry.description
for kw in whitelist): for kw in whitelist):