fchmod() does not work on object returned by open(), so use chmod
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
30a52cab0f
commit
4e4d648593
1 changed files with 2 additions and 6 deletions
|
@ -514,14 +514,10 @@ class Cdist:
|
|||
|
||||
outfile_fd = open(outfile, "w")
|
||||
self.shell_run_or_debug_fail(bin, [bin], env=env, stdout=outfile_fd)
|
||||
|
||||
a = outfile_fd
|
||||
b = stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR
|
||||
print(type(a), type(b))
|
||||
|
||||
os.fchmod(outfile_fd, stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR)
|
||||
outfile_fd.close()
|
||||
|
||||
os.chmod(outfile, stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR)
|
||||
|
||||
if mode == "code":
|
||||
# paths = self.object_code_paths(cdist_object)
|
||||
local_dir = self.object_dir(cdist_object)
|
||||
|
|
Loading…
Reference in a new issue