diff options
| author | 2020-03-08 16:21:55 -0400 | |
|---|---|---|
| committer | 2020-03-08 16:21:55 -0400 | |
| commit | 33a6aac8d6c9f2739128fdc10f9f8205507a62d4 (patch) | |
| tree | e323e9484bc3ab04c791e1253bdd9c3f5ccf640b | |
| parent | Merge pull request #820 from python-discord/feat/ci/pre-commit-tweaks (diff) | |
Fix filtered extension string out of scope for log message
* Fix typo in file extensions list comprehension
| -rw-r--r-- | bot/cogs/antimalware.py | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/bot/cogs/antimalware.py b/bot/cogs/antimalware.py index 373619895..79bf486a4 100644 --- a/bot/cogs/antimalware.py +++ b/bot/cogs/antimalware.py @@ -29,8 +29,9 @@ class AntiMalware(Cog):              return          embed = Embed() -        file_extensions = {splitext(message.filename.lower())[1] for message in message.attachments} +        file_extensions = {splitext(attachment.filename.lower())[1] for attachment in message.attachments}          extensions_blocked = file_extensions - set(AntiMalwareConfig.whitelist) +        blocked_extensions_str = ', '.join(extensions_blocked)          if ".py" in extensions_blocked:              # Short-circuit on *.py files to provide a pastebin link              embed.description = ( @@ -38,7 +39,6 @@ class AntiMalware(Cog):                  f"please use a code-pasting service such as {URLs.site_schema}{URLs.site_paste}"              )          elif extensions_blocked: -            blocked_extensions_str = ', '.join(extensions_blocked)              whitelisted_types = ', '.join(AntiMalwareConfig.whitelist)              meta_channel = self.bot.get_channel(Channels.meta)              embed.description = ( | 
