diff options
| author | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-09-11 20:33:13 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-09-11 20:33:13 -0700 |
| commit | 63a2c67fa79eda8d6182055ab2fb67e2475491a0 (patch) | |
| tree | 15130d777e659c8295edc4314df0b676da71c04c /nova/utils.py | |
| parent | e19a3b21ed6bc331efeee756b1c1665d2538a263 (diff) | |
| parent | c2c113917d3e354f85d473a6d646688b59abad17 (diff) | |
merged trunk
Diffstat (limited to 'nova/utils.py')
| -rw-r--r-- | nova/utils.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nova/utils.py b/nova/utils.py index 011a5cb09..8939043e6 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -33,6 +33,7 @@ from twisted.internet.threads import deferToThread from nova import exception from nova import flags +from nova.exception import ProcessExecutionError FLAGS = flags.FLAGS @@ -129,8 +130,10 @@ def runthis(prompt, cmd, check_exit_code = True): exit_code = subprocess.call(cmd.split(" ")) logging.debug(prompt % (exit_code)) if check_exit_code and exit_code <> 0: - raise Exception( "Unexpected exit code: %s from cmd: %s" - % (exit_code, cmd)) + raise ProcessExecutionError(exit_code=exit_code, + stdout=None, + stderr=None, + cmd=cmd) def generate_uid(topic, size=8): |
