Fix CommandParser.run exit status.

This commit is contained in:
Florian Bruhin 2014-02-19 11:02:09 +01:00
parent 9a990d56d9
commit d58ef3ff84

View File

@ -209,17 +209,18 @@ class CommandParser(QObject):
arguments. arguments.
Return: Return:
FIXME True if command was called (handler returnstatus is ignored!).
False if command wasn't called (there was an ignored exception).
Emit: Emit:
error: If there was an error parsing a command. error: If there was an error parsing a command.
""" """
if ';;' in text: if ';;' in text:
retvals = []
for sub in text.split(';;'): for sub in text.split(';;'):
# FIXME handle return codes retvals.append(self.run(sub, count, ignore_exc))
self.run(sub, count, ignore_exc) return all(retvals)
return
try: try:
self._parse(text) self._parse(text)
self._check() self._check()
@ -237,4 +238,4 @@ class CommandParser(QObject):
else: else:
raise raise
self._run(count=count) self._run(count=count)
# FIXME return val return True