From 880e86dc3b16ea6d8b90d3f47fd4952fa313b20d Mon Sep 17 00:00:00 2001 From: Luke Mathew-Byrne <11181703+LMByrne@users.noreply.github.com> Date: Sat, 29 Jun 2019 16:47:41 +0100 Subject: [PATCH] Update disco/bot/bot.py Co-Authored-By: Andrei Zbikowski --- disco/bot/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disco/bot/bot.py b/disco/bot/bot.py index 420f420..b4010c2 100644 --- a/disco/bot/bot.py +++ b/disco/bot/bot.py @@ -189,7 +189,7 @@ class Bot(LoggingClass): # Convert our configured mapping of entities to levels into something # we can actually use. This ensures IDs are converted properly, and maps # any level names (e.g. `role_id: admin`) map to their numerical values. - for entity_id, level in six.iteritems(self.config.levels.copy()): + for entity_id, level in list(six.iteritems(self.config.levels)): del self.config.levels[entity_id] entity_id = int(entity_id) if str(entity_id).isdigit() else entity_id level = int(level) if str(level).isdigit() else get_enum_value_by_name(CommandLevels, level)