diff --git a/pagure/lib/tasks.py b/pagure/lib/tasks.py index 583f0ca..e152711 100644 --- a/pagure/lib/tasks.py +++ b/pagure/lib/tasks.py @@ -795,12 +795,11 @@ def update_checksums_file(self, session, folder, filenames): # This wasn't generated by pagure, don't touch it! return - algos = { - 'sha256': hashlib.sha256(), - 'sha512': hashlib.sha512(), - } - for filename in filenames: + algos = { + 'sha256': hashlib.sha256(), + 'sha512': hashlib.sha512(), + } # for each files computes the different algorythm supported with open(os.path.join(folder, filename), "rb") as stream: while True: