Flag safe usage of sha1 w/ #nosec

This tells bandit that this usage of sha1 is not
interesting for security scans.

Change-Id: Ibc0f75d9eef04c919410cafb1a1713d6470f8142
This commit is contained in:
Eric Harney
2019-08-26 12:40:50 -04:00
parent fd106c77bf
commit 4e3588f390

View File

@@ -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))