This commit is contained in:
JohniFi 2026-02-20 17:44:34 -08:00 committed by GitHub
commit 1a92dbcd5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3467,12 +3467,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.
@ -3487,6 +3488,9 @@ class ExitCommand(_COMMAND_DEFAULT_CLASS):
# No shorthand error message. Call hook.
self.obj.at_failed_traverse(self.caller)
def get_display_name(self, looker=None, **kwargs):
return self.obj.get_display_name(looker, **kwargs)
def get_extra_info(self, caller, **kwargs):
"""
Shows a bit of information on where the exit leads.
@ -3506,7 +3510,7 @@ class ExitCommand(_COMMAND_DEFAULT_CLASS):
destination=self.obj.destination.get_display_name(caller, **kwargs)
)
else:
return " (%s)" % self.obj.get_display_name(caller, **kwargs)
return _(" (exit)")
#