summaryrefslogtreecommitdiff
path: root/keystoneclient/client.py
diff options
context:
space:
mode:
authorChuck Short <chuck.short@canonical.com>2013-02-06 09:36:51 -0600
committerChuck Short <chuck.short@canonical.com>2013-02-11 12:29:39 -0600
commitb998ff92527cf542f7e8db127cd65bfc7ccceb1a (patch)
treee9b8de15585fbc97d57636b9735527ef19a9b259 /keystoneclient/client.py
parentff24716d0964121faaa57ec3bd724fde0e6c0ad7 (diff)
downloadpython-keystoneclient-b998ff92527cf542f7e8db127cd65bfc7ccceb1a.tar.gz
Allow requests up to 0.8 and greater
The requests module dropped all configuration with the 1.0.0 release. There's no danger_mode and no 'verbose'' mode. The former shouldn't be necessary anymore and the latter can be done by setting a different log handler for the request.logging root logger. Change-Id: I41bfaf2574f6d7fc21f86e0124ceae7df6481eee Signed-off-by: Chuck Short <chuck.short@canonical.com>
Diffstat (limited to 'keystoneclient/client.py')
-rw-r--r--keystoneclient/client.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/keystoneclient/client.py b/keystoneclient/client.py
index 0233aeb..14c38b0 100644
--- a/keystoneclient/client.py
+++ b/keystoneclient/client.py
@@ -50,10 +50,6 @@ class HTTPClient(object):
USER_AGENT = 'python-keystoneclient'
- requests_config = {
- 'danger_mode': False,
- }
-
def __init__(self, username=None, tenant_id=None, tenant_name=None,
password=None, auth_url=None, region_name=None, timeout=None,
endpoint=None, token=None, cacert=None, key=None,
@@ -121,7 +117,8 @@ class HTTPClient(object):
ch = logging.StreamHandler()
_logger.setLevel(logging.DEBUG)
_logger.addHandler(ch)
- self.requests_config['verbose'] = sys.stderr
+ if hasattr(requests, logging):
+ requests.logging.getLogger(requests.__name__).addHandler(ch)
# keyring setup
self.use_keyring = use_keyring and keyring_available
@@ -336,7 +333,6 @@ class HTTPClient(object):
method,
url,
verify=self.verify_cert,
- config=self.requests_config,
**request_kwargs)
self.http_log_resp(resp)