From 70eca51d85ae67ad20eb827c7b0a404ecdc10da9 Mon Sep 17 00:00:00 2001 From: linuxdaemon Date: Tue, 14 Nov 2017 16:36:48 -0600 Subject: [PATCH] Forgot to initialize the botwide observer --- cloudbot/bot.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cloudbot/bot.py b/cloudbot/bot.py index d3f4a16da..21582b6db 100644 --- a/cloudbot/bot.py +++ b/cloudbot/bot.py @@ -11,6 +11,7 @@ from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import scoped_session, sessionmaker from sqlalchemy.schema import MetaData +from watchdog.observers import Observer from cloudbot.client import Client from cloudbot.clients.irc import IrcClient, irc_clean @@ -118,6 +119,8 @@ def __init__(self, loop=asyncio.get_event_loop()): # create bot connections self.create_connections() + self.observer = Observer() + if self.plugin_reloading_enabled: self.plugin_reloader = PluginReloader(self) @@ -171,6 +174,8 @@ def stop(self, reason=None, *, restart=False): logger.debug("Stopping plugin reloader.") self.plugin_reloader.stop() + self.observer.stop() + for connection in self.connections.values(): if not connection.connected: # Don't quit a connection that hasn't connected