mirror of
https://github.com/evennia/evennia.git
synced 2026-03-27 02:06:32 +01:00
Added checks to avoid the "ErrorCmdset" from being saved permanently in the database in some particular circumstances.
This commit is contained in:
parent
21408c56cf
commit
54a92ffd8c
1 changed files with 3 additions and 3 deletions
|
|
@ -240,7 +240,7 @@ class CmdSetHandler(object):
|
|||
elif path:
|
||||
cmdset = self._import_cmdset(path)
|
||||
if cmdset:
|
||||
cmdset.permanent = True
|
||||
cmdset.permanent = cmdset.key != '_ERROR_CMDSET'
|
||||
self.cmdset_stack.append(cmdset)
|
||||
|
||||
# merge the stack into a new merged cmdset
|
||||
|
|
@ -284,7 +284,7 @@ class CmdSetHandler(object):
|
|||
# this is (maybe) a python path. Try to import from cache.
|
||||
cmdset = self._import_cmdset(cmdset)
|
||||
if cmdset:
|
||||
if permanent:
|
||||
if permanent and cmdset.key != '_CMDSET_ERROR':
|
||||
# store the path permanently
|
||||
cmdset.permanent = True
|
||||
storage = self.obj.cmdset_storage
|
||||
|
|
@ -323,7 +323,7 @@ class CmdSetHandler(object):
|
|||
self.cmdset_stack = [cmdset]
|
||||
self.mergetype_stack = [cmdset.mergetype]
|
||||
|
||||
if permanent:
|
||||
if permanent and cmdset.key != '_CMDSET_ERROR':
|
||||
cmdset.permanent = True
|
||||
storage = self.obj.cmdset_storage
|
||||
if storage:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue