diff options
author | Robert Collins <rbtcollins@hp.com> | 2014-07-07 13:18:35 +1200 |
---|---|---|
committer | Robert Collins <rbtcollins@hp.com> | 2014-07-07 13:18:35 +1200 |
commit | c87cbe62ec5efd166392ba777e63a690e11ebdb7 (patch) | |
tree | ab5d986d2395d9a1bab75ec071c928ff090aa7af /ironic/nova | |
parent | 9ba13b875fe14f03f8bc0754cefbca333ae7ef77 (diff) | |
download | ironic-c87cbe62ec5efd166392ba777e63a690e11ebdb7.tar.gz |
Simplify error handling
This code block is needlessly complex.
Change-Id: I41375458d21e38267cd0a1d21b0b14ab498fc172
Diffstat (limited to 'ironic/nova')
-rw-r--r-- | ironic/nova/virt/ironic/driver.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ironic/nova/virt/ironic/driver.py b/ironic/nova/virt/ironic/driver.py index 14f0f8234..a66cfed40 100644 --- a/ironic/nova/virt/ironic/driver.py +++ b/ironic/nova/virt/ironic/driver.py @@ -563,9 +563,7 @@ class IronicDriver(virt_driver.ComputeDriver): # TODO(deva): This exception should be added to # python-ironicclient and matched directly, # rather than via __name__. - if getattr(e, '__name__', None) == 'InstanceDeployFailure': - pass - else: + if getattr(e, '__name__', None) != 'InstanceDeployFailure': raise # using a dict because this is modified in the local method |