From: Daan De Meyer Date: Thu, 5 Sep 2024 12:30:52 +0000 (+0200) Subject: Don't delete reader in _tempfile() backport X-Git-Tag: v25~314^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3005%2Fhead;p=thirdparty%2Fmkosi.git Don't delete reader in _tempfile() backport This is only passed Path.read_bytes so there is nothing to delete hence drop this part since it confuses mypyc. --- diff --git a/mkosi/backport.py b/mkosi/backport.py index 4b0902eef..2a542c4e7 100644 --- a/mkosi/backport.py +++ b/mkosi/backport.py @@ -31,7 +31,6 @@ def _tempfile( os.write(fd, reader()) finally: os.close(fd) - del reader yield Path(raw_path) finally: try: