fchmod() does not work on object returned by open(), so use chmod

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
remotes/origin/feature_files_export
Nico Schottelius 13 years ago
parent 30a52cab0f
commit 4e4d648593
  1. 8
      bin/cdist

@ -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…
Cancel
Save