From e8408d6aa7d62cb2d051808d619a6c8370b4a36c Mon Sep 17 00:00:00 2001 From: ddc Date: Tue, 11 Aug 2020 16:26:23 -0300 Subject: [PATCH] update --- src/utils/utilities.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utils/utilities.py b/src/utils/utilities.py index 5e8accb..1db3b5e 100644 --- a/src/utils/utilities.py +++ b/src/utils/utilities.py @@ -154,15 +154,15 @@ def dialog_get_file_path(): ################################################################################ -def md5Checksum(filePath): - with open(filePath, 'rb') as fh: - m = hashlib.md5() +def md5_checksum(file_path): + md5 = hashlib.md5() + with open(file_path, 'rb') as f: while True: - data = fh.read(8192) + data = f.read(md5.block_size) if not data: break - m.update(data) - return m.hexdigest() + md5.update(data) + return md5.hexdigest().upper() ################################################################################