Index: branches/ariel/xmldumps-backup/monitor.py |
— | — | @@ -41,7 +41,11 @@ |
42 | 42 | |
43 | 43 | def updateIndex(): |
44 | 44 | outputFileName = os.path.join(config.publicDir, config.index) |
45 | | - WikiDump.dumpFile(outputFileName, generateIndex()) |
| 45 | + tempFilename = outputFileName + ".tmp" |
| 46 | + file = open(tempFilename, "wt") |
| 47 | + file.write(generateIndex()) |
| 48 | + file.close() |
| 49 | + os.rename(tempFilename, outputFileName) |
46 | 50 | |
47 | 51 | if __name__ == "__main__": |
48 | 52 | updateIndex() |