From 05f731253d812fd98c332eb4d6170ca758f84666 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 21 Jan 2013 16:51:23 +0100 Subject: [PATCH] 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 --- keystoneclient/common/cms.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/keystoneclient/common/cms.py b/keystoneclient/common/cms.py index 93c05050c..f13264da0 100644 --- a/keystoneclient/common/cms.py +++ b/keystoneclient/common/cms.py @@ -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