Skip to content

Commit 3265dd4

Browse files
committed
Simply error logic, remove show_url check
1 parent 9018585 commit 3265dd4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

sopel/modules/wikipedia.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,11 @@ def say_snippet(bot, trigger, server, query, show_url=True, commanded=False):
188188
# see https://github.com/sopel-irc/sopel/issues/2259
189189
snippet = re.sub(r"\s+", " ", snippet)
190190
except KeyError:
191-
if show_url:
192-
msg = 'Error fetching snippet for "{}".'.format(page_name)
193-
if commanded:
194-
bot.reply(msg)
195-
else:
196-
bot.say(msg)
191+
msg = 'Error fetching snippet for "{}".'.format(page_name)
192+
if commanded:
193+
bot.reply(msg)
194+
else:
195+
bot.say(msg)
197196
return
198197

199198
msg = '{} | "{}'.format(page_name, snippet)

0 commit comments

Comments
 (0)