Pass along RunCommandException correctly. This is a minor

fix, but it leads to better error messages from ctest.

Change-Id: I624ad805ef037b022e6e67b56f0ed10ca05fe325

BUG=11096
TEST=Test currently in progress.

Review URL: http://codereview.chromium.org/6257007
This commit is contained in:
Don Garrett 2011-01-20 11:44:41 -08:00
parent a4cc3cd3ab
commit 83d063b670

View File

@ -81,9 +81,9 @@ def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None,
raise RunCommandException('Command "%r" failed.\n' % (cmd) + raise RunCommandException('Command "%r" failed.\n' % (cmd) +
(error_message or error or output or '')) (error_message or error or output or ''))
except Exception, e: except RunCommandException as e:
if not error_ok and retry_count == num_retries: if not error_ok and retry_count == num_retries:
raise RunCommandException(e) raise e
else: else:
Warning(str(e)) Warning(str(e))
if print_cmd: if print_cmd: