From 5c26a30a5701311504782b03788bdc60fd105955 Mon Sep 17 00:00:00 2001 From: wangjunlin Date: Thu, 14 Apr 2022 20:25:35 +0800 Subject: [PATCH] modify generate_plugin Signed-off-by: wangjunlin Change-Id: I05b50fbdf14beee510c26a8c5d6bc60385bf4d8d --- ts2panda/scripts/generate_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts2panda/scripts/generate_plugin.py b/ts2panda/scripts/generate_plugin.py index 7b3e660db2..0f7fe8e3dd 100755 --- a/ts2panda/scripts/generate_plugin.py +++ b/ts2panda/scripts/generate_plugin.py @@ -93,10 +93,10 @@ def gen_java_method(input_arguments): (out_dir, _) = os.path.split(input_arguments.generated_file) js_bin_file = os.path.join(out_dir, file_name_pre + JS_BIN_EXT) - flags = os.O_WRONLY | os.O_CREAT | os.EXCL + flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL modes = stat.S_IWUSR | stat.S_IRUSR - with (os.fdopen(out_file, flags, modes), "w") as output: + with os.fdopen(os.open(out_file, flags, modes), "w") as output: output.write("/*%s * Generated from Java and JavaScript plugins by ts2abc.%s */%s%s" % (os.linesep, os.linesep, os.linesep, os.linesep)) -- Gitee