summaryrefslogtreecommitdiff
path: root/keystoneclient/adapter.py
diff options
context:
space:
mode:
authorChristopher J Schaefer <cjschaef@us.ibm.com>2016-03-11 15:55:06 -0600
committerChristopher J Schaefer <cjschaef@us.ibm.com>2016-04-19 10:35:00 -0500
commitdbf4f3164655ec69a830ed87db0769f01ac1f720 (patch)
treecb93fd0797e8ea00d6faa94f01adddc6bd7083c1 /keystoneclient/adapter.py
parent91d1053f6811d454c538c85ea601dc700a56b4b3 (diff)
downloadpython-keystoneclient-dbf4f3164655ec69a830ed87db0769f01ac1f720.tar.gz
Removing bandit.yaml in favor of defaults
Removing old configuration options for build-in defaults of latest bandit functionality. Also, marking flagged items with _# nosec_ with a descriptive comment on why the code is acceptable as is. Co-Authored-By: Christopher J Schaefer <cjschaef@us.ibm.com> Co-Authored-By: Tom Cocozzello <tjcocozz@us.ibm.com> Change-Id: I138ebd46a8be195177361a9c3306bb70423b639d
Diffstat (limited to 'keystoneclient/adapter.py')
-rw-r--r--keystoneclient/adapter.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/keystoneclient/adapter.py b/keystoneclient/adapter.py
index 17561a4..faa61a6 100644
--- a/keystoneclient/adapter.py
+++ b/keystoneclient/adapter.py
@@ -206,7 +206,8 @@ class LegacyJsonAdapter(Adapter):
try:
kwargs['json'] = kwargs.pop('body')
- except KeyError:
+ except KeyError: # nosec(cjschaef): kwargs doesn't contain a 'body'
+ # key, while 'json' is an optional argument for Session.request
pass
resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
@@ -215,7 +216,8 @@ class LegacyJsonAdapter(Adapter):
if resp.text:
try:
body = jsonutils.loads(resp.text)
- except ValueError:
+ except ValueError: # nosec(cjschaef): return None for body as
+ # expected
pass
return resp, body