From b517cac4cfde69e81f8c7228089c56a8c3505348 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sat, 29 Jul 2017 15:25:44 +0200 Subject: [PATCH] Fix module unloading --- nemubot/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nemubot/bot.py b/nemubot/bot.py index febe7d6..aa1cb3e 100644 --- a/nemubot/bot.py +++ b/nemubot/bot.py @@ -569,7 +569,7 @@ class Bot(threading.Thread): self.event_timer.cancel() logger.info("Save and unload all modules...") - for mod in self.modules.items(): + for mod in [m for m in self.modules.keys()]: self.unload_module(mod) logger.info("Close all servers connection...")