Merge branch '2.2' into 3.0

# Conflicts:
#	requirements.txt
#	setup.py
This commit is contained in:
grossmj committed 2024-11-18 11:46:42 +10:00
commit bd813b0a53
4 files changed
+30 -11

No files matched your search

+12
View File
@@ -23,6 +23,7 @@ import textwrap
import posixpath
import socket
import errno
import hashlib
def force_unix_path(path):
@@ -109,3 +110,14 @@ def is_ipv6_enabled() -> bool:
if e.errno == errno.EADDRINUSE:
return True
raise
def md5sum(filename):
"""
Calculate the MD5 checksum of a file.
"""
hash_md5 = hashlib.md5()
with open(filename, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
hash_md5.update(chunk)
return hash_md5.hexdigest()