summaryrefslogtreecommitdiffstats
path: root/nova/crypto.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/crypto.py')
-rw-r--r--nova/crypto.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/nova/crypto.py b/nova/crypto.py
index 73af2f25a..41e8e9869 100644
--- a/nova/crypto.py
+++ b/nova/crypto.py
@@ -295,8 +295,12 @@ def _sign_csr(csr_text, ca_folder):
inbound = os.path.join(tmpdir, 'inbound.csr')
outbound = os.path.join(tmpdir, 'outbound.csr')
- with open(inbound, 'w') as csrfile:
- csrfile.write(csr_text)
+ try:
+ with open(inbound, 'w') as csrfile:
+ csrfile.write(csr_text)
+ except IOError:
+ LOG.exception(_('Failed to write inbound.csr'))
+ raise
LOG.debug(_('Flags path: %s'), ca_folder)
start = os.getcwd()