diff options
| author | Justin Santa Barbara <justin@fathomdb.com> | 2011-12-22 23:16:05 -0800 |
|---|---|---|
| committer | Justin Santa Barbara <justin@fathomdb.com> | 2011-12-22 23:16:05 -0800 |
| commit | 4eaa167ca992fbc7ac90e43c218be7b2bdf177da (patch) | |
| tree | 87a00a703c7266fac94768608de987ef324578d3 | |
| parent | 787f76eb8ae3949cceed950c8cc9513d46b8277b (diff) | |
| download | nova-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
| -rw-r--r-- | nova/exception.py | 6 |
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: |
