r100038 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100037‎ | r100038 | r100039 >
Date:15:32, 17 October 2011
Author:ariel
Status:deferred
Tags:
Comment:
fix check of argument existence
Modified paths:
  • /branches/ariel/xmldumps-backup/monitor.py (modified) (history)

Diff [purge]

Index: branches/ariel/xmldumps-backup/monitor.py
@@ -6,12 +6,6 @@
77 from os.path import exists
88 from WikiDump import FileUtils
99
10 -# can specify name of alternate config file
11 -if (sys.argv[1]):
12 - config = WikiDump.Config(sys.argv[1])
13 -else:
14 - config = WikiDump.Config()
15 -
1610 def generateIndex():
1711 running = False
1812 states = []
@@ -52,4 +46,10 @@
5347 os.rename(tempFilename, outputFileName)
5448
5549 if __name__ == "__main__":
 50+ # can specify name of alternate config file
 51+ if (len(sys.argv) > 2):
 52+ config = WikiDump.Config(sys.argv[1])
 53+ else:
 54+ config = WikiDump.Config()
 55+
5656 updateIndex()

Status & tagging log