Avoid potential shadowing issue

This commit is contained in:
ChrisLR 2022-07-24 10:51:19 -04:00
parent 0985dff331
commit 01f2159198

View file

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