diff options
author | Jenkins <jenkins@review.openstack.org> | 2012-12-20 23:44:00 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2012-12-20 23:44:00 +0000 |
commit | af16e5f24d77f0a11a0ec33af428b45a7c6fecdf (patch) | |
tree | ca0e5bb37c2bcf291615d2ce2f930ad2297b154d /nova/crypto.py | |
parent | 62c31c7a9b0b86e787971daf18e1496a8ce1d883 (diff) | |
parent | 4bfce3609692f1426af1b797b18dc7b292b6bdd1 (diff) | |
download | nova-af16e5f24d77f0a11a0ec33af428b45a7c6fecdf.tar.gz nova-af16e5f24d77f0a11a0ec33af428b45a7c6fecdf.tar.xz nova-af16e5f24d77f0a11a0ec33af428b45a7c6fecdf.zip |
Merge "Trap exception when trying to write csr"
Diffstat (limited to 'nova/crypto.py')
-rw-r--r-- | nova/crypto.py | 8 |
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() |