r97951 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97950‎ | r97951 | r97952 >
Date:20:15, 23 September 2011
Author:ariel
Status:deferred
Tags:
Comment:
replace call to removed function with a few lines of inline code
Modified paths:
  • /branches/ariel/xmldumps-backup/monitor.py (modified) (history)

Diff [purge]

Index: branches/ariel/xmldumps-backup/monitor.py
@@ -41,7 +41,11 @@
4242
4343 def updateIndex():
4444 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)
4650
4751 if __name__ == "__main__":
4852 updateIndex()

Status & tagging log