summaryrefslogtreecommitdiffstats
path: root/nova/crypto.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/crypto.py')
-rw-r--r--nova/crypto.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/crypto.py b/nova/crypto.py
index 4d72aa624..736e99961 100644
--- a/nova/crypto.py
+++ b/nova/crypto.py
@@ -38,6 +38,7 @@ from pyasn1.type import univ
from nova import context
from nova import db
from nova import exception
+from nova.openstack.common import excutils
from nova.openstack.common import fileutils
from nova.openstack.common import log as logging
from nova.openstack.common import timeutils
@@ -387,8 +388,8 @@ def _sign_csr(csr_text, ca_folder):
with open(inbound, 'w') as csrfile:
csrfile.write(csr_text)
except IOError:
- LOG.exception(_('Failed to write inbound.csr'))
- raise
+ with excutils.save_and_reraise_exception():
+ LOG.exception(_('Failed to write inbound.csr'))
LOG.debug(_('Flags path: %s'), ca_folder)
start = os.getcwd()