From 01f21591984b1a2db9aba482fd32a64321cc47b2 Mon Sep 17 00:00:00 2001 From: ChrisLR Date: Sun, 24 Jul 2022 10:51:19 -0400 Subject: [PATCH] Avoid potential shadowing issue --- evennia/commands/cmdset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evennia/commands/cmdset.py b/evennia/commands/cmdset.py index 98dc999e22..9d8877a679 100644 --- a/evennia/commands/cmdset.py +++ b/evennia/commands/cmdset.py @@ -571,7 +571,7 @@ class CmdSet(object, metaclass=_CmdSetMeta): """ if isinstance(cmd, str): - cmd = next((cmd for cmd in self.commands if cmd.key == cmd), None) + cmd = next((_cmd for _cmd in self.commands if _cmd.key == cmd), None) if cmd is None: return None @@ -599,7 +599,7 @@ class CmdSet(object, metaclass=_CmdSetMeta): """ if isinstance(cmd, str): - cmd = next((cmd for cmd in self.commands if cmd.key == cmd), None) + cmd = next((_cmd for _cmd in self.commands if _cmd.key == cmd), None) if cmd is None: return None