Fix release hash validation on older Python
This commit is contained in:
@@ -38,8 +38,11 @@ def read_packaged_manifest(xpi_path: Path) -> dict:
|
||||
|
||||
|
||||
def sha256_digest(xpi_path: Path) -> str:
|
||||
digest = hashlib.sha256()
|
||||
with xpi_path.open('rb') as xpi_file:
|
||||
return hashlib.file_digest(xpi_file, 'sha256').hexdigest()
|
||||
for block in iter(lambda: xpi_file.read(1024 * 1024), b''):
|
||||
digest.update(block)
|
||||
return digest.hexdigest()
|
||||
|
||||
|
||||
def update_about_plugin_link(xpi_path: Path) -> None:
|
||||
|
||||
Reference in New Issue
Block a user