Complete the cleanup of the lint-basic run #2194

Merged
PeterSurda merged 2 commits from gitea-75 into v0.6 2024-03-06 14:27:34 +01:00
3 changed files with 5 additions and 4 deletions
Showing only changes of commit 95659b6f6c - Show all commits

View File

@ -40,7 +40,8 @@ def generate_hash(string):
try:
# make input case insensitive
string = str.lower(string)
hash_object = hashlib.md5(str.encode(string)) # nosec B324, B303
hash_object = hashlib.md5( # nosec B324, B303
str.encode(string))
print(hash_object.hexdigest())
# returned object is a hex string
return hash_object.hexdigest()

View File

@ -85,7 +85,7 @@ def pickle_deserialize_old_knownnodes(source):
the new format is {Peer:{"lastseen":i, "rating":f}}
"""
global knownNodes
knownNodes = pickle.load(source)
knownNodes = pickle.load(source) # nosec B301
for stream in knownNodes.keys():
for node, params in knownNodes[stream].iteritems():
if isinstance(params, (float, int)):

View File

@ -276,8 +276,8 @@ def buildCPoW():
'-f', 'Makefile.bsd']) # nosec B607, B603
else:
# GNU make
call(["make", "-C", os.path.join(paths.codePath(),
"bitmsghash")]) # nosec B607, B603
call([ # nosec B607, B603
"make", "-C", os.path.join(paths.codePath(), "bitmsghash")])
if os.path.exists(os.path.join(paths.codePath(), "bitmsghash", "bitmsghash.so")):
init()
notifyBuild(True)