summaryrefslogtreecommitdiffstats
path: root/nova/image
diff options
context:
space:
mode:
authorAlex Meade <alex.meade@rackspace.com>2012-05-03 14:29:50 -0400
committerAlex Meade <alex.meade@rackspace.com>2012-05-07 10:38:28 -0400
commit2f552e957fddcd9e042a09a2d32d32fa564c18e7 (patch)
treeba2914fb539f0143e90cb3fbb921cb67623f4762 /nova/image
parenteb9e54c1129080ad0f5b569b39dfa09c539f2f11 (diff)
downloadnova-2f552e957fddcd9e042a09a2d32d32fa564c18e7.tar.gz
nova-2f552e957fddcd9e042a09a2d32d32fa564c18e7.tar.xz
nova-2f552e957fddcd9e042a09a2d32d32fa564c18e7.zip
Replaces exceptions.Error with NovaException
Fixes bug 817107 Change-Id: I6253e6bbcc44676c587b315fa32afba6459e676a
Diffstat (limited to 'nova/image')
-rw-r--r--nova/image/s3.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/nova/image/s3.py b/nova/image/s3.py
index 1b8b76596..de5d10f1f 100644
--- a/nova/image/s3.py
+++ b/nova/image/s3.py
@@ -376,15 +376,15 @@ class S3ImageService(object):
"args": {"project_id": context.project_id,
"text": base64.b64encode(encrypted_key)}})
except Exception, exc:
- raise exception.Error(_('Failed to decrypt private key: %s')
- % exc)
+ msg = _('Failed to decrypt private key: %s') % exc
+ raise exception.NovaException(msg)
try:
iv = rpc.call(elevated, FLAGS.cert_topic,
{"method": "decrypt_text",
"args": {"project_id": context.project_id,
"text": base64.b64encode(encrypted_iv)}})
except Exception, exc:
- raise exception.Error(_('Failed to decrypt initialization '
+ raise exception.NovaException(_('Failed to decrypt initialization '
'vector: %s') % exc)
try:
@@ -395,7 +395,7 @@ class S3ImageService(object):
'-iv', '%s' % (iv,),
'-out', '%s' % (decrypted_filename,))
except exception.ProcessExecutionError, exc:
- raise exception.Error(_('Failed to decrypt image file '
+ raise exception.NovaException(_('Failed to decrypt image file '
'%(image_file)s: %(err)s') %
{'image_file': encrypted_filename,
'err': exc.stdout})
@@ -407,7 +407,7 @@ class S3ImageService(object):
for n in tar_file.getnames():
if not os.path.abspath(os.path.join(path, n)).startswith(path):
tar_file.close()
- raise exception.Error(_('Unsafe filenames in image'))
+ raise exception.NovaException(_('Unsafe filenames in image'))
tar_file.close()
@staticmethod