mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
add check for obj (and add typing for linting)
This commit is contained in:
parent
302047eda5
commit
32b0d694e9
1 changed files with 3 additions and 2 deletions
|
|
@ -3464,12 +3464,13 @@ class ExitCommand(_COMMAND_DEFAULT_CLASS):
|
|||
|
||||
"""
|
||||
|
||||
#obj = None
|
||||
|
||||
def func(self):
|
||||
"""
|
||||
Default exit traverse if no syscommand is defined.
|
||||
"""
|
||||
if not hasattr(self, "obj") or self.obj is None:
|
||||
return
|
||||
self.obj = typing.cast(DefaultExit, self.obj)
|
||||
|
||||
if self.obj.access(self.caller, "traverse"):
|
||||
# we may traverse the exit.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue