From 0ea57f33a97a7dcaf2d2a99d96879b049a17b8c1 Mon Sep 17 00:00:00 2001 From: Griatch Date: Tue, 12 Nov 2013 20:51:26 +0100 Subject: [PATCH] Made it so system cmdsets (_exitcmdset and _channelcmdset for example) don't replace the name of other cmdsets in a merger. These "invisible" cmdsets caused confusion for the key_mergetype dictionary (which should e.g. ignore the DefaultCharacter set instead of replace it, but since the system cmdsets were merged in, the DefaultCharacter set is no longer named that when it's time to merge in the new set). The fix ignores name replacing if the merging set has a key starting with _. --- src/commands/cmdset.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/commands/cmdset.py b/src/commands/cmdset.py index 1346e2f091..4d2b3bda76 100644 --- a/src/commands/cmdset.py +++ b/src/commands/cmdset.py @@ -278,6 +278,9 @@ class CmdSet(object): cmdset_c.no_channels = self.no_channels cmdset_c.no_exits = self.no_exits cmdset_c.no_objs = self.no_objs + if self.key.startswith("_"): + # don't rename new output if the merge set's name starts with _ + cmdset_c.key = cmdset_b.key else: # B higher priority than A @@ -297,6 +300,9 @@ class CmdSet(object): cmdset_c.no_channels = cmdset_b.no_channels cmdset_c.no_exits = cmdset_b.no_exits cmdset_c.no_objs = cmdset_b.no_objs + if cmdset_b.key.startswith("_"): + # don't rename new output if the merge set's name starts with _ + cmdset_c.key = self.key # we store actual_mergetype since key_mergetypes # might be different from the main mergetype.