From 1a11790f2d26ec92858a3ffa100388310912fae1 Mon Sep 17 00:00:00 2001 From: Michael Still Date: Fri, 3 May 2013 10:47:39 +1000 Subject: Convert to using oslo's execute() method. There are some small warts (mostly around other execute() like methods which reuse the exception). I will fix these warts in later reviews. Change-Id: Ice9cdbdc5f3e5a9f8365f5d99acf1863a9fe3e7a --- nova/openstack/common/processutils.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nova/openstack') diff --git a/nova/openstack/common/processutils.py b/nova/openstack/common/processutils.py index fbd2c6ff2..45a5bf963 100644 --- a/nova/openstack/common/processutils.py +++ b/nova/openstack/common/processutils.py @@ -42,6 +42,12 @@ class UnknownArgumentError(Exception): class ProcessExecutionError(Exception): def __init__(self, stdout=None, stderr=None, exit_code=None, cmd=None, description=None): + self.exit_code = exit_code + self.stderr = stderr + self.stdout = stdout + self.cmd = cmd + self.description = description + if description is None: description = "Unexpected error while running command." if exit_code is None: -- cgit