summaryrefslogtreecommitdiff
path: root/updateForge.py
diff options
context:
space:
mode:
authortxtsd <thexerothermicsclerodermoid@gmail.com>2022-04-06 17:51:52 +0530
committertxtsd <thexerothermicsclerodermoid@gmail.com>2022-04-06 17:51:52 +0530
commitaf0ed5f92f139af2d74efd95a4dcba2620bb4b8d (patch)
treeeb80309665d806b9cdeb61664dfe1f2b068e7043 /updateForge.py
parent501621a3884cfd07670c00885e2afadeecfdc52b (diff)
downloadProject-Tick-af0ed5f92f139af2d74efd95a4dcba2620bb4b8d.tar.gz
Project-Tick-af0ed5f92f139af2d74efd95a4dcba2620bb4b8d.zip
refactor: Don't shadow built-in name 'hash'
Diffstat (limited to 'updateForge.py')
-rwxr-xr-xupdateForge.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/updateForge.py b/updateForge.py
index 51efd5f9b4..ab4a94b5ad 100755
--- a/updateForge.py
+++ b/updateForge.py
@@ -46,11 +46,11 @@ def eprint(*args, **kwargs):
def filehash(filename, hashtype, blocksize=65536):
- hash = hashtype()
+ hashtype = hashtype()
with open(filename, "rb") as f:
for block in iter(lambda: f.read(blocksize), b""):
- hash.update(block)
- return hash.hexdigest()
+ hashtype.update(block)
+ return hashtype.hexdigest()
def get_single_forge_files_manifest(longversion):
@@ -79,18 +79,18 @@ def get_single_forge_files_manifest(longversion):
count = 0
while index < len(extensionObj.items()):
mutable_copy = copy.deepcopy(extensionObj)
- extension, hash = mutable_copy.popitem()
+ extension, hashtype = mutable_copy.popitem()
if not type(classifier) == str:
pprint(classifier)
pprint(extensionObj)
- if not type(hash) == str:
+ if not type(hashtype) == str:
pprint(classifier)
pprint(extensionObj)
print('%s: Skipping missing hash for extension %s:' % (longversion, extension))
index += 1
continue
assert type(classifier) == str
- processed_hash = re.sub(r"\W", "", hash)
+ processed_hash = re.sub(r"\W", "", hashtype)
if not len(processed_hash) == 32:
print('%s: Skipping invalid hash for extension %s:' % (longversion, extension))
pprint(extensionObj)