summaryrefslogtreecommitdiff
path: root/keystoneclient/utils.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/utils.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/utils.py')
-rw-r--r--keystoneclient/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/keystoneclient/utils.py b/keystoneclient/utils.py
index 7d3fcef..107f8f9 100644
--- a/keystoneclient/utils.py
+++ b/keystoneclient/utils.py
@@ -33,7 +33,8 @@ def find_resource(manager, name_or_id):
# first try the entity as a string
try:
return manager.get(name_or_id)
- except (exceptions.NotFound):
+ except (exceptions.NotFound): # nosec(cjschaef): try to find 'name_or_id'
+ # as a six.binary_type instead
pass
# finally try to find entity by name
@@ -94,7 +95,8 @@ def prompt_user_password():
# Check for Ctl-D
try:
password = getpass.getpass('Password: ')
- except EOFError:
+ except EOFError: # nosec(cjschaef): return password, which is None if
+ # password was not found
pass
return password