diff --git a/src/chat_control.py b/src/chat_control.py index dc259dfbe..66e13114b 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -82,8 +82,6 @@ class ChatControlBase(MessageControl, CommonCommands): '''A base class containing a banner, ConversationTextview, MessageTextView ''' - DISPATCHED_BY = CommonCommands - def make_href(self, match): url_color = gajim.config.get('urlmsgcolor') return '%s' % (match.group(), diff --git a/src/commands/framework.py b/src/commands/framework.py index c5a2fe84c..86e890db9 100644 --- a/src/commands/framework.py +++ b/src/commands/framework.py @@ -27,12 +27,11 @@ class CommandInternalError(Exception): class CommandError(Exception): def __init__(self, message=None, command=None, name=None): + self.command = command + self.name = name + if command: - self.command = command self.name = command.first_name - elif name: - self.command = None - self.name = name if message: super(CommandError, self).__init__(message) @@ -343,7 +342,7 @@ class CommandProcessor(object): # Quite complex piece of regular expression logic. ARG_PATTERN = re.compile(r'(\'|")?(?P
(?(1).+?|\S+))(?(1)\1)') - OPT_PATTERN = re.compile(r'--?(?P