[Buildbot-devel] runner.py change

Nick Trout nick at rockstarvancouver.com
Mon May 2 20:47:25 UTC 2005


I moved the chmod after the copy because if the makefile is read only
this failed (e.g. if you have it in version control, locked). Moving the
chmod here (from the end) removes the read only flag and allows the file
append.

Scripts/runner.py:63

    def makefile(self, source, cmd):
        target = "Makefile"
        if os.path.exists(target):
            print "not touching existing Makefile"
            print "installing sample in Makefile.sample instead"
            target = "Makefile.sample"
        shutil.copy(source, target)
        os.chmod(target, 0600)    <<<<<<<<<
        f = open(target, "a")
        f.write("\n")
        f.write("tap:\n")
        f.write("\t" + cmd + "\n")
        f.write("\n")
        f.close()


Nick





More information about the devel mailing list