未验证 提交 6141a59c 编写于 作者: O openharmony_ci 提交者: Gitee

!1714 FIX:修改python文件打开权限

Merge pull request !1714 from cheng_jinsong/0118_py
...@@ -67,7 +67,7 @@ def fix_para_file(options): ...@@ -67,7 +67,7 @@ def fix_para_file(options):
if options.extra: if options.extra:
parse_extra_params(options.extra, contents) parse_extra_params(options.extra, contents)
flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL flags = os.O_WRONLY | os.O_CREAT
modes = stat.S_IWUSR | stat.S_IRUSR | stat.S_IWGRP | stat.S_IRGRP modes = stat.S_IWUSR | stat.S_IRUSR | stat.S_IWGRP | stat.S_IRGRP
with os.fdopen(os.open(options.output, flags, modes), 'w') as f: with os.fdopen(os.open(options.output, flags, modes), 'w') as f:
for key in contents: for key in contents:
......
...@@ -837,7 +837,7 @@ class SeccompPolicyParser: ...@@ -837,7 +837,7 @@ class SeccompPolicyParser:
' ' + '\n '.join(self.bpf_generator.bpf_policy) + footer ' ' + '\n '.join(self.bpf_generator.bpf_policy) + footer
flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL flags = os.O_WRONLY | os.O_CREAT
modes = stat.S_IWUSR | stat.S_IRUSR | stat.S_IWGRP | stat.S_IRGRP modes = stat.S_IWUSR | stat.S_IRUSR | stat.S_IWGRP | stat.S_IRGRP
with os.fdopen(os.open(args.dstfile, flags, modes), 'w') as output_file: with os.fdopen(os.open(args.dstfile, flags, modes), 'w') as output_file:
output_file.write(content) output_file.write(content)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册