From dbf4f3164655ec69a830ed87db0769f01ac1f720 Mon Sep 17 00:00:00 2001 From: Christopher J Schaefer Date: Fri, 11 Mar 2016 15:55:06 -0600 Subject: 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 Co-Authored-By: Tom Cocozzello Change-Id: I138ebd46a8be195177361a9c3306bb70423b639d --- keystoneclient/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'keystoneclient/utils.py') 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 -- cgit v1.2.1