3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 17:29:21 +01:00

control: don't spew "Stopping plugins" notices if none are loaded

(cherry picked from commit d818c17072)
This commit is contained in:
James Lu 2017-08-16 12:17:08 -07:00
parent b9a66244f0
commit 481561f972

View File

@ -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.