don't backup by default; helps fixing distcheck

Original commit message from CVS:
don't backup by default; helps fixing distcheck
parent be31c7df
......@@ -66,16 +66,17 @@ class Tmpl:
return "".join(lines)
def write(self):
def write(self, backup=False):
"""
Write out the template file again, backing up the previous one.
"""
target = self.filename + ".mangle.bak"
os.rename(self.filename, target)
if backup:
target = self.filename + ".mangle.bak"
os.rename(self.filename, target)
handle = open(self.filename, "w")
handle.write(self.output())
handle.close()
def main():
if len(sys.argv) > 1 and sys.argv[1]:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment