From 2f552e957fddcd9e042a09a2d32d32fa564c18e7 Mon Sep 17 00:00:00 2001 From: Alex Meade Date: Thu, 3 May 2012 14:29:50 -0400 Subject: Replaces exceptions.Error with NovaException Fixes bug 817107 Change-Id: I6253e6bbcc44676c587b315fa32afba6459e676a --- nova/image/s3.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nova/image') 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 -- cgit