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:
|
elif path:
|
||||||
cmdset = self._import_cmdset(path)
|
cmdset = self._import_cmdset(path)
|
||||||
if cmdset:
|
if cmdset:
|
||||||
cmdset.permanent = True
|
cmdset.permanent = cmdset.key != '_ERROR_CMDSET'
|
||||||
self.cmdset_stack.append(cmdset)
|
self.cmdset_stack.append(cmdset)
|
||||||
|
|
||||||
# merge the stack into a new merged 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.
|
# this is (maybe) a python path. Try to import from cache.
|
||||||
cmdset = self._import_cmdset(cmdset)
|
cmdset = self._import_cmdset(cmdset)
|
||||||
if cmdset:
|
if cmdset:
|
||||||
if permanent:
|
if permanent and cmdset.key != '_CMDSET_ERROR':
|
||||||
# store the path permanently
|
# store the path permanently
|
||||||
cmdset.permanent = True
|
cmdset.permanent = True
|
||||||
storage = self.obj.cmdset_storage
|
storage = self.obj.cmdset_storage
|
||||||
|
|
@ -323,7 +323,7 @@ class CmdSetHandler(object):
|
||||||
self.cmdset_stack = [cmdset]
|
self.cmdset_stack = [cmdset]
|
||||||
self.mergetype_stack = [cmdset.mergetype]
|
self.mergetype_stack = [cmdset.mergetype]
|
||||||
|
|
||||||
if permanent:
|
if permanent and cmdset.key != '_CMDSET_ERROR':
|
||||||
cmdset.permanent = True
|
cmdset.permanent = True
|
||||||
storage = self.obj.cmdset_storage
|
storage = self.obj.cmdset_storage
|
||||||
if storage:
|
if storage:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue