From 546bad013f7a145261dbedc49a6169c49002b404 Mon Sep 17 00:00:00 2001 From: hakarrr Date: Sat, 24 Oct 2026 16:47:37 +0530 Subject: [PATCH] fix(tools): open the unwrap_self temporary file through io.open --- tools/unwrap_self.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/unwrap_self.py b/tools/unwrap_self.py index 8181e49ddc18..484334e200d3 100644 --- a/tools/unwrap_self.py +++ b/tools/unwrap_self.py @@ -30,6 +30,7 @@ """ import argparse +import io import math import secrets import struct @@ -329,7 +330,7 @@ def region_for(offset, size): destination.parent.mkdir(parents=True, exist_ok=True) temporary_path = destination.parent / (".unwrap-self-" + secrets.token_hex(16)) - temporary = temporary_path.open("xb") + temporary = io.open(temporary_path, "xb") try: with temporary: temporary.write(result)