summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Harney <eharney@redhat.com>2019-08-26 12:40:50 -0400
committerEric Harney <eharney@redhat.com>2019-08-26 12:40:50 -0400
commit4e3588f3903f53b3892d1a9f64d6bdb1e0edb82c (patch)
tree985c4682e44bd71701795719f559c214ad0aac3a
parentfd106c77bffecaf81985fa0006ffe147ce7b8ef2 (diff)
downloadpython-cinderclient-4e3588f3903f53b3892d1a9f64d6bdb1e0edb82c.tar.gz
Flag safe usage of sha1 w/ #nosec
This tells bandit that this usage of sha1 is not interesting for security scans. Change-Id: Ibc0f75d9eef04c919410cafb1a1713d6470f8142
-rw-r--r--cinderclient/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cinderclient/base.py b/cinderclient/base.py
index b17d745..e84eb2f 100644
--- a/cinderclient/base.py
+++ b/cinderclient/base.py
@@ -265,7 +265,7 @@ class Manager(common_base.HookableMixin):
# pair
username = utils.env('OS_USERNAME', 'CINDER_USERNAME')
url = utils.env('OS_URL', 'CINDER_URL')
- uniqifier = hashlib.sha1(username.encode('utf-8') +
+ uniqifier = hashlib.sha1(username.encode('utf-8') + # nosec
url.encode('utf-8')).hexdigest()
cache_dir = os.path.expanduser(os.path.join(base_dir, uniqifier))