Rename variable
This commit is contained in:
parent
5aae6b3df8
commit
47a4951279
1 changed files with 3 additions and 3 deletions
|
@ -22,13 +22,13 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
|
||||
def _calc_hash(existing_file: Path):
|
||||
CHUNK_SIZE = 1024 * 1024
|
||||
chunk_size = 1024 * 1024
|
||||
md5_hash = hashlib.md5()
|
||||
with open(existing_file, 'rb') as file:
|
||||
chunk = file.read(CHUNK_SIZE)
|
||||
chunk = file.read(chunk_size)
|
||||
while chunk:
|
||||
md5_hash.update(chunk)
|
||||
chunk = file.read(CHUNK_SIZE)
|
||||
chunk = file.read(chunk_size)
|
||||
file_hash = md5_hash.hexdigest()
|
||||
return existing_file, file_hash
|
||||
|
||||
|
|
Loading…
Reference in a new issue