diff --git a/core/fs.py b/core/fs.py index 3435aba9..9fc89cfb 100644 --- a/core/fs.py +++ b/core/fs.py @@ -138,8 +138,13 @@ class File: try: with self.path.open("rb") as fp: md5 = hashlib.md5() - while filedata := fp.read(CHUNK_SIZE): + filedata = fp.read(CHUNK_SIZE) + while filedata: md5.update(filedata) + filedata = fp.read(CHUNK_SIZE) + # FIXME For python 3.8 and later + # while filedata := fp.read(CHUNK_SIZE): + # md5.update(filedata) self.md5 = md5.digest() except Exception: pass