summaryrefslogtreecommitdiff
path: root/openstackclient/image
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-07-07 20:56:17 +0000
committerGerrit Code Review <review@openstack.org>2016-07-07 20:56:18 +0000
commitffb232a90e8b5c8358e017bf057a045a2d59bbfc (patch)
tree4900840df82bb3151d997aee85610df0ecc4ac4a /openstackclient/image
parent2adeac2bc2421a96273dfbc2b39a43cc06e542e6 (diff)
parent6f36385cb87d04577d60032f6e74c732edab6d45 (diff)
downloadpython-openstackclient-ffb232a90e8b5c8358e017bf057a045a2d59bbfc.tar.gz
Merge "Correct reraising of exception"
Diffstat (limited to 'openstackclient/image')
-rwxr-xr-x[-rw-r--r--]openstackclient/image/v2/image.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py
index 309b1b6b..64092fea 100644..100755
--- a/openstackclient/image/v2/image.py
+++ b/openstackclient/image/v2/image.py
@@ -339,7 +339,7 @@ class CreateImage(command.ShowOne):
with fp:
try:
image_client.images.upload(image.id, fp)
- except Exception as e:
+ except Exception:
# If the upload fails for some reason attempt to remove the
# dangling queued image made by the create() call above but
# only if the user did not specify an id which indicates
@@ -349,7 +349,7 @@ class CreateImage(command.ShowOne):
image_client.images.delete(image.id)
except Exception:
pass # we don't care about this one
- raise e # now, throw the upload exception again
+ raise # now, throw the upload exception again
# update the image after the data has been uploaded
image = image_client.images.get(image.id)
@@ -834,11 +834,11 @@ class SetImage(command.Command):
try:
image = image_client.images.update(image.id, **kwargs)
- except Exception as e:
+ except Exception:
if activation_status is not None:
LOG.info(_("Image %(id)s was %(status)s."),
{'id': image.id, 'status': activation_status})
- raise e
+ raise
class ShowImage(command.ShowOne):