Adds usedforsecurity=False to HPE 3PAR driver
To appease Bandit since SHA1 angers the beast, usedforsecurity=False will be bolted to the hash function Change-Id: I33bbb7070ada5509ca05c90d7a38077d38f54a1f
This commit is contained in:
parent
36549c8b97
commit
e47c6c2611
@ -357,7 +357,7 @@ class HPE3ParShareDriver(driver.ShareDriver):
|
|||||||
source_file = inspect.getsourcefile(clazz)
|
source_file = inspect.getsourcefile(clazz)
|
||||||
file_size = os.path.getsize(source_file)
|
file_size = os.path.getsize(source_file)
|
||||||
|
|
||||||
sha1 = hashlib.sha1()
|
sha1 = hashlib.sha1(usedforsecurity=False)
|
||||||
sha1.update(("blob %u\0" % file_size).encode('utf-8'))
|
sha1.update(("blob %u\0" % file_size).encode('utf-8'))
|
||||||
|
|
||||||
with open(source_file, 'rb') as f:
|
with open(source_file, 'rb') as f:
|
||||||
|
Loading…
Reference in New Issue
Block a user