aboutsummaryrefslogtreecommitdiffstats
path: root/keystone-moon/keystone/contrib/federation/idp.py
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2015-09-24 16:27:16 +0200
committerasteroide <thomas.duval@orange.com>2015-09-24 16:27:16 +0200
commit92d11d139e9f76d4fd76859aea78643fc32ef36b (patch)
treebd5a2e7b50853498074ab55bdaee4452c460010b /keystone-moon/keystone/contrib/federation/idp.py
parent49325d99acfadaadfad99c596c4ada6b5ec849de (diff)
Update Keystone code from repository.
Change-Id: Ib3d0a06b10902fcc6d520f58e85aa617bc326d00
Diffstat (limited to 'keystone-moon/keystone/contrib/federation/idp.py')
-rw-r--r--keystone-moon/keystone/contrib/federation/idp.py13
1 files changed, 7 insertions, 6 deletions
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: