diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2017-11-05 10:42:23 +0100 |
---|---|---|
committer | kensington <kensington@gentoo.org> | 2017-11-05 22:17:13 +1100 |
commit | 9dee0a20b1db2ece9c49774e88b7a65607da4658 (patch) | |
tree | 5e8280cd44368d330ab858ddf0da5fd6ffd28015 /tatt | |
parent | be more selective when removing things from keywords file (diff) | |
download | tatt-9dee0a20b1db2ece9c49774e88b7a65607da4658.tar.gz tatt-9dee0a20b1db2ece9c49774e88b7a65607da4658.tar.bz2 tatt-9dee0a20b1db2ece9c49774e88b7a65607da4658.zip |
write file permissions as octal
Diffstat (limited to 'tatt')
-rw-r--r-- | tatt/scriptwriter.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tatt/scriptwriter.py b/tatt/scriptwriter.py index 9874217..2e445c3 100644 --- a/tatt/scriptwriter.py +++ b/tatt/scriptwriter.py @@ -52,7 +52,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(),484) # 484 = 0744 = rwxr--r-- + os.fchmod(outfile.fileno(), 0o744) # rwxr--r-- outfile.close() ###################################### @@ -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(),484) + os.fchmod(outfile.fileno(), 0o744) outfile.close() @@ -119,7 +119,7 @@ def writesucessreportscript (job, config): updatebug=updatebug.replace("@@BUG@@", job.bugnumber) outfile = open(outfilename,'w') outfile.write(updatebug) - os.fchmod(outfile.fileno(),484) + os.fchmod(outfile.fileno(), 0o744) outfile.close() print("Success Report script written to " + outfilename) @@ -184,7 +184,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(),484) + os.fchmod(outfile.fileno(), 0o744) outfile.close() print("Commit script written to " + outfilename) @@ -205,5 +205,5 @@ def writeCleanUpScript (job, config): print("WARNING: Will overwrite " + outfilename) outfile = open(outfilename,'w') outfile.write(script) - os.fchmod(outfile.fileno(),484) + os.fchmod(outfile.fileno(), 0o744) outfile.close() |