Restore Python 2.6 compatibility

Python 2.6 did not have a keyword argument 'output'
in the constructor defined yet, which caused a TypeError
exception

Change-Id: I4d455bef3480a7511172c58fd4794fa1e8acce8c
This commit is contained in:
Dirk Mueller
2013-01-21 16:51:23 +01:00
parent 3dfb8437fc
commit 05f731253d

View File

@@ -42,7 +42,11 @@ def cms_verify(formatted, signing_cert_file_name, ca_file_name):
retcode = process.poll()
if retcode:
LOG.error('Verify error: %s' % err)
raise subprocess.CalledProcessError(retcode, "openssl", output=err)
# NOTE(dmllr): Python 2.6 compatibility:
# CalledProcessError did not have output keyword argument
e = subprocess.CalledProcessError(retcode, "openssl")
e.output = err
raise e
return output