From d58ef3ff84da225aab5171fa52662c1ad5f9f839 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 19 Feb 2014 11:02:09 +0100 Subject: [PATCH] Fix CommandParser.run exit status. --- qutebrowser/commands/utils.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/qutebrowser/commands/utils.py b/qutebrowser/commands/utils.py index c0e0afbfb..89a77f9a6 100644 --- a/qutebrowser/commands/utils.py +++ b/qutebrowser/commands/utils.py @@ -209,17 +209,18 @@ class CommandParser(QObject): arguments. Return: - FIXME + True if command was called (handler returnstatus is ignored!). + False if command wasn't called (there was an ignored exception). Emit: error: If there was an error parsing a command. """ if ';;' in text: + retvals = [] for sub in text.split(';;'): - # FIXME handle return codes - self.run(sub, count, ignore_exc) - return + retvals.append(self.run(sub, count, ignore_exc)) + return all(retvals) try: self._parse(text) self._check() @@ -237,4 +238,4 @@ class CommandParser(QObject): else: raise self._run(count=count) - # FIXME return val + return True