Skip to content

Commit

Permalink
Set permissions of generated scripts to 744
Browse files Browse the repository at this point in the history
  • Loading branch information
tom111 committed Oct 15, 2012
1 parent 054c73b commit e03e778
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tatt/scriptwriter.py
Expand Up @@ -51,7 +51,7 @@ def writeusecombiscript(job, config):
outfile.write(useCombiTestString(p, config).replace("@@REPORTFILE@@",reportname))
# Note: fchmod needs the filedescriptor which is an internal
# integer retrieved by fileno().
os.fchmod(outfile.fileno(),0711)
os.fchmod(outfile.fileno(),0744)
outfile.close()


Expand Down Expand Up @@ -100,7 +100,7 @@ def writerdepscript(job, config):
# Todo: remove duplicates
localsnippet = rdepTestString (r, config)
outfile.write(localsnippet.replace("@@REPORTFILE@@", reportname))
os.fchmod(outfile.fileno(),0711)
os.fchmod(outfile.fileno(),0744)
outfile.close()


Expand All @@ -116,7 +116,7 @@ def writesucessreportscript (job, config):
succmess = config['successmessage'].replace("@@ARCH@@", config['arch'])
outfile.write("else bugz modify " + job.bugnumber + ' -c' + "\"" + succmess + "\";\n")
outfile.write("fi;")
os.fchmod(outfile.fileno(),0711)
os.fchmod(outfile.fileno(),0744)
outfile.close()
print(("Success Report script written to " + outfilename))

Expand Down Expand Up @@ -181,7 +181,7 @@ def writecommitscript (job, config):
outfile.write(s)
# Footer (committing)
outfile.write (commitfooterfile.read().replace("@@ARCH@@", config['arch']).replace("@@BUG@@", job.bugnumber))
os.fchmod(outfile.fileno(),0711)
os.fchmod(outfile.fileno(),0744)
outfile.close()
print(("Commit script written to " + outfilename))

Expand All @@ -202,6 +202,6 @@ def writeCleanUpScript (job, config):
print(("WARNING: Will overwrite " + outfilename))
outfile = open(outfilename,'w')
outfile.write(script)
os.fchmod(outfile.fileno(),0711)
os.fchmod(outfile.fileno(),0744)
outfile.close()

0 comments on commit e03e778

Please sign in to comment.