summaryrefslogtreecommitdiffstats
path: root/nova/exception.py
diff options
context:
space:
mode:
authorJustin Santa Barbara <justin@fathomdb.com>2011-12-22 23:16:05 -0800
committerJustin Santa Barbara <justin@fathomdb.com>2011-12-22 23:16:05 -0800
commit4eaa167ca992fbc7ac90e43c218be7b2bdf177da (patch)
tree87a00a703c7266fac94768608de987ef324578d3 /nova/exception.py
parent787f76eb8ae3949cceed950c8cc9513d46b8277b (diff)
downloadnova-4eaa167ca992fbc7ac90e43c218be7b2bdf177da.tar.gz
nova-4eaa167ca992fbc7ac90e43c218be7b2bdf177da.tar.xz
nova-4eaa167ca992fbc7ac90e43c218be7b2bdf177da.zip
Add exit_code, stdout, stderr etc to ProcessExecutionException
This means that we can now catch ProcessExecutionException and inspect the result, in order to handle "acceptable" exceptions e.g. file does not exist on a remove Change-Id: I4f5dfe1f1d4601dafc50abc4c61f4b616f13c5ff
Diffstat (limited to 'nova/exception.py')
-rw-r--r--nova/exception.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py
index 345b313f7..043322607 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -50,6 +50,12 @@ def novaclient_converter(f):
class ProcessExecutionError(IOError):
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: