From 92d11d139e9f76d4fd76859aea78643fc32ef36b Mon Sep 17 00:00:00 2001 From: asteroide Date: Thu, 24 Sep 2015 16:27:16 +0200 Subject: Update Keystone code from repository. Change-Id: Ib3d0a06b10902fcc6d520f58e85aa617bc326d00 --- keystone-moon/keystone/contrib/federation/idp.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'keystone-moon/keystone/contrib/federation/idp.py') diff --git a/keystone-moon/keystone/contrib/federation/idp.py b/keystone-moon/keystone/contrib/federation/idp.py index 739fc01a..51689989 100644 --- a/keystone-moon/keystone/contrib/federation/idp.py +++ b/keystone-moon/keystone/contrib/federation/idp.py @@ -12,7 +12,6 @@ import datetime import os -import subprocess import uuid from oslo_config import cfg @@ -32,11 +31,14 @@ xmldsig = importutils.try_import("saml2.xmldsig") if not xmldsig: xmldsig = importutils.try_import("xmldsig") +from keystone.common import environment from keystone.common import utils from keystone import exception from keystone.i18n import _, _LE +subprocess = environment.subprocess + LOG = log.getLogger(__name__) CONF = cfg.CONF @@ -426,11 +428,10 @@ def _sign_assertion(assertion): stdout = subprocess.check_output(command_list, stderr=subprocess.STDOUT) except Exception as e: - msg = _LE('Error when signing assertion, reason: %(reason)s') - msg = msg % {'reason': e} - if hasattr(e, 'output'): - msg += ' output: %(output)s' % {'output': e.output} - LOG.error(msg) + msg = _LE('Error when signing assertion, reason: %(reason)s%(output)s') + LOG.error(msg, + {'reason': e, + 'output': ' ' + e.output if hasattr(e, 'output') else ''}) raise exception.SAMLSigningError(reason=e) finally: try: -- cgit 1.2.3-korg