mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 00:06:30 +01:00
Avoid potential shadowing issue
This commit is contained in:
parent
0985dff331
commit
01f2159198
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue