From d59328c273708dc11332a47619bdc68601737fd4 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 d07cc8e..5651bcd 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...")