From 54a92ffd8cfcf5bbb15fee1c0547def1ee716037 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 20 Oct 2012 09:47:02 +0200 Subject: [PATCH] Added checks to avoid the "ErrorCmdset" from being saved permanently in the database in some particular circumstances. --- src/commands/cmdsethandler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/cmdsethandler.py b/src/commands/cmdsethandler.py index 699ae3538f..4c19164f31 100644 --- a/src/commands/cmdsethandler.py +++ b/src/commands/cmdsethandler.py @@ -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: