]> git.ipfire.org Git - pbs.git/commitdiff
uploads: Add forgotten loop
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 15 Jul 2022 10:15:22 +0000 (10:15 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 15 Jul 2022 10:15:22 +0000 (10:15 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/uploads.py

index d8e6bf5a2d4fbd996e350adf8d30486c83245815..3d6cbd4907fe8345a177929ae1bb38735bd8c389 100644 (file)
@@ -173,11 +173,12 @@ class Upload(base.DataObject):
 
                # Read the entire file and pass it to the hash function
                with open(self.path, "rb") as f:
-                       buf = f.read(4096)
-                       if not buf:
-                               break
+                       while True:
+                               buf = f.read(4096)
+                               if not buf:
+                                       break
 
-                       h.update(buf)
+                               h.update(buf)
 
                # Return the digest
                return h.digest()