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: |