From bd3b001310e5542a5a3db65d805132096450b7d2 Mon Sep 17 00:00:00 2001 From: zhangdd_ewan Date: Wed, 17 Apr 2024 19:22:51 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E3=80=91=E6=A0=B9=E6=8D=AE=E9=9C=80=E8=A6=81=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E5=90=88=E9=80=82=E7=9A=84=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangdd_ewan --- tool/update_tool/download_iana.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tool/update_tool/download_iana.py b/tool/update_tool/download_iana.py index c0f4744..3c8117d 100644 --- a/tool/update_tool/download_iana.py +++ b/tool/update_tool/download_iana.py @@ -109,7 +109,9 @@ def main(): new_version = file_name[6:11] try_download(file_type, new_version, download_path, version) decompress(file_type + new_version + '.tar.gz', download_path) - with open(os.path.join(download_path, 'version.txt'), 'w') as file: + flags = os.O_WRONLY + modes = stat.S_IWUSR | stat.S_IRUSR + with os.fdopen(os.open(os.path.join(download_path, 'version.txt'), flags, modes), 'w') as file: file.write(new_version + '\n') -- Gitee