From: Manuel Mausz Date: Thu, 2 Feb 2023 12:40:56 +0000 (+0000) Subject: Fix --checksum true X-Git-Tag: v15~343 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7facc6fbf56f9963f16c39ef451c3780af8102b;p=thirdparty%2Fmkosi.git Fix --checksum true File should be opened for reading --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index caf596f0d..86e05493a 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1164,7 +1164,7 @@ def hash_file(of: TextIO, path: Path) -> None: bs = 16 * 1024**2 h = hashlib.sha256() - with path.open("wb") as sf: + with path.open("rb") as sf: while (buf := sf.read(bs)): h.update(buf)