wikipedia: fix minor issues
This commit is contained in:
parent
f0676caa9a
commit
6e343987f0
|
@ -54,7 +54,7 @@ class WikipediaPlugin(Plugin):
|
|||
if page:
|
||||
reply = WikipediaPlugin.limit_text_length(page.summary)
|
||||
self.register_url_for_plus(page.url, event.target)
|
||||
self.bot.say(event.target, summary)
|
||||
self.bot.say(event.target, reply)
|
||||
|
||||
def tell_definition(self, event):
|
||||
page = None
|
||||
|
@ -70,7 +70,7 @@ class WikipediaPlugin(Plugin):
|
|||
except wikipedia.exceptions.PageError:
|
||||
reply = self.config["empty_response"]
|
||||
break
|
||||
except:
|
||||
except Exception:
|
||||
reply = self.bot.config["error_message"]
|
||||
# Keep trying after a slight delay.
|
||||
time.sleep(1)
|
||||
|
|
Loading…
Reference in a new issue