From 481561f972dd0dd23f8132edf9bc0b40640a55c1 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 16 Aug 2017 12:17:08 -0700 Subject: [PATCH] control: don't spew "Stopping plugins" notices if none are loaded (cherry picked from commit d818c170726cf343678a0e98b8fac1e527df4a58) --- coremods/control.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coremods/control.py b/coremods/control.py index 38ffb53..b67d9ab 100644 --- a/coremods/control.py +++ b/coremods/control.py @@ -36,6 +36,10 @@ def _remove_pid(): log.debug('Not removing PID file %s as world._should_remove_pid is False.' % pidfile) def _kill_plugins(irc=None): + if not world.plugins: + # No plugins were loaded or we were in a pre-initialized state, ignore. + return + log.info("Shutting down plugins.") for name, plugin in world.plugins.items(): # Before closing connections, tell all plugins to shutdown cleanly first.