summaryrefslogtreecommitdiffstats
path: root/keystone/auth
diff options
context:
space:
mode:
authorJamie Lennox <jlennox@redhat.com>2013-05-30 17:48:04 +1000
committerAdam Young <ayoung@redhat.com>2013-06-18 14:10:36 -0400
commit3afd9791ef3e2472987cdabb54ef5f27a062469c (patch)
treee4bb40f0431bd3061a9fc6ea66f8df5aa6be067e /keystone/auth
parenta012186bb68c5514dda87f1e045983a3c2e5b236 (diff)
downloadkeystone-3afd9791ef3e2472987cdabb54ef5f27a062469c.tar.gz
keystone-3afd9791ef3e2472987cdabb54ef5f27a062469c.tar.xz
keystone-3afd9791ef3e2472987cdabb54ef5f27a062469c.zip
Isolate eventlet code into environment.
The environment module will be configured once, during code initialization. Subsequently all other possibly-evented modules will retrieve from environment and transparently obtain either the eventlet or standard library modules. If eventlet, httplib, subprocess or other environment dependant module is referenced outside of the environment module it should be considered a bug. The changes to tests are required to ensure that test is imported first to setup the environment. Hopefully these can all be replaced with an __init__.py in a post-nose keystone. Implements: blueprint extract-eventlet Change-Id: Icacd6f2ee0906ac5d303777c1f87a184f38283bf
Diffstat (limited to 'keystone/auth')
-rw-r--r--keystone/auth/token_factory.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/keystone/auth/token_factory.py b/keystone/auth/token_factory.py
index 43a23ce6..64f945fa 100644
--- a/keystone/auth/token_factory.py
+++ b/keystone/auth/token_factory.py
@@ -17,12 +17,12 @@
"""Token Factory"""
import json
-import subprocess
import uuid
import webob
from keystone import catalog
from keystone.common import cms
+from keystone.common import environment
from keystone.common import logging
from keystone.common import utils
from keystone import config
@@ -310,7 +310,7 @@ def create_token(context, auth_context, auth_info):
token_id = cms.cms_sign_token(json.dumps(token_data),
CONF.signing.certfile,
CONF.signing.keyfile)
- except subprocess.CalledProcessError:
+ except environment.subprocess.CalledProcessError:
raise exception.UnexpectedError(_(
'Unable to sign token.'))
else: