mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Merge pull request #3642 from InspectorCaracal/patch-33
Gracefully handle missing `caller.ndb._more` in `CmdMoreExit`
This commit is contained in:
commit
8ed9377015
1 changed files with 6 additions and 2 deletions
|
|
@ -79,7 +79,7 @@ class CmdMore(Command):
|
|||
Implement the command
|
||||
"""
|
||||
more = self.caller.ndb._more
|
||||
if not more and inherits_from(self.caller, evennia.DefaultObject):
|
||||
if not more and hasattr(self.caller, 'account') and self.caller.account:
|
||||
more = self.caller.account.ndb._more
|
||||
if not more:
|
||||
self.caller.msg("Error in loading the pager. Contact an admin.")
|
||||
|
|
@ -111,9 +111,13 @@ class CmdMoreExit(Command):
|
|||
def func(self):
|
||||
"""
|
||||
Exit pager and re-fire the failed command.
|
||||
|
||||
"""
|
||||
more = self.caller.ndb._more
|
||||
if not more and hasattr(self.caller, 'account') and self.caller.account:
|
||||
more = self.caller.account.ndb._more
|
||||
if not more:
|
||||
self.caller.msg("Error in exiting the pager. Contact an admin.")
|
||||
return
|
||||
more.page_quit()
|
||||
|
||||
# re-fire the command (in new cmdset)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue