Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Unified Diff: lib/cros_build_lib.py

Issue 6257007: Pass along RunCommandException correctly. This is a minor (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/cros_build_lib.py
diff --git a/lib/cros_build_lib.py b/lib/cros_build_lib.py
index 2e6876060c1dce08b93bfa630402f598e7ba548d..ec7c0281676ee5b7fa8082f73e26e47c3206868c 100644
--- a/lib/cros_build_lib.py
+++ b/lib/cros_build_lib.py
@@ -81,9 +81,9 @@ def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None,
raise RunCommandException('Command "%r" failed.\n' % (cmd) +
(error_message or error or output or ''))
- except Exception, e:
+ except RunCommandException as e:
if not error_ok and retry_count == num_retries:
- raise RunCommandException(e)
+ raise e
else:
Warning(str(e))
if print_cmd:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698