r95404 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95403‎ | r95404 | r95405 >
Date:17:26, 24 August 2011
Author:ariel
Status:ok
Tags:
Comment:
actually check user's y/n in a fashion that works; write dumpruninfo file in place, no need for temp file first
Modified paths:
  • /branches/ariel/xmldumps-backup/worker.py (modified) (history)

Diff [purge]

Index: branches/ariel/xmldumps-backup/worker.py
@@ -395,7 +395,7 @@
396396 directory = self._getDumpRunInfoDirName()
397397 dumpRunInfoFilename = self._getDumpRunInfoFileName()
398398 # FileUtils.writeFile(directory, dumpRunInfoFilename, text, self.wiki.config.fileperms)
399 - FileUtils.writeFile(self.wiki.config.tempDir, dumpRunInfoFilename, text, self.wiki.config.fileperms)
 399+ FileUtils.writeFileInPlace(self.wiki.config.tempDir, dumpRunInfoFilename, text, self.wiki.config.fileperms)
400400
401401 # format: name:%; updated:%; status:%
402402 def _getStatusForJobFromRunInfoFileLine(self, line, jobName):
@@ -1646,7 +1646,7 @@
16471647 print "This means that the status information about the old run will be lost, and"
16481648 print "only the information about the current (and future) runs will be kept."
16491649 reply = raw_input("Continue anyways? [y/N]: ")
1650 - if (not reply in "y", "Y"):
 1650+ if (not reply in [ "y", "Y" ]):
16511651 raise RuntimeError( "No run information available for previous dump, exiting" )
16521652 if (not self.wiki.existsPerDumpIndex()):
16531653 # AFAWK this is a new run (not updating or rerunning an old run),

Status & tagging log