Compare commits
No commits in common. "b7b6ca71be1d410ded047171719c04cf27f2b143" and "cde8d8883d39f580543a14e793af054c87d9a66e" have entirely different histories.
b7b6ca71be
...
cde8d8883d
|
@ -114,8 +114,6 @@ class Bot(irc.client.SimpleIRCClient, Logger):
|
|||
try:
|
||||
self.start()
|
||||
except KeyboardInterrupt:
|
||||
self.log_i("Caught keyboard interrupt.")
|
||||
finally:
|
||||
self.log_i("Stopping Edmond.")
|
||||
self.__save_storage()
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class WikipediaPlugin(Plugin):
|
|||
try:
|
||||
summary = wikipedia.summary(wikipedia.random(), sentences=1)
|
||||
break
|
||||
except: # The wikipedia package can raise a lot of different stuff.
|
||||
except wikipedia.exceptions.WikipediaException:
|
||||
pass
|
||||
retries -= 1
|
||||
if summary:
|
||||
|
@ -59,7 +59,7 @@ class WikipediaPlugin(Plugin):
|
|||
except wikipedia.exceptions.PageError:
|
||||
summary = self.config["empty_response"]
|
||||
break
|
||||
except:
|
||||
except wikipedia.exceptions.WikipediaException:
|
||||
summary = self.bot.config["error_message"]
|
||||
# Keep trying after a slight delay.
|
||||
time.sleep(1)
|
||||
|
|
|
@ -35,8 +35,10 @@ class YoutubeParserPlugin(Plugin):
|
|||
def on_pubmsg(self, event):
|
||||
words = event.arguments[0].split()
|
||||
for word in words:
|
||||
self.bot.log_d("testing " + word)
|
||||
match = self.VIDEO_URL_RE.match(word)
|
||||
if match:
|
||||
self.bot.log_d("match!")
|
||||
return self.handle_match(match, event.target)
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in a new issue