Index: branches/ariel/xmldumps-backup/monitor.py |
— | — | @@ -6,12 +6,6 @@ |
7 | 7 | from os.path import exists |
8 | 8 | from WikiDump import FileUtils |
9 | 9 | |
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 | | - |
16 | 10 | def generateIndex(): |
17 | 11 | running = False |
18 | 12 | states = [] |
— | — | @@ -52,4 +46,10 @@ |
53 | 47 | os.rename(tempFilename, outputFileName) |
54 | 48 | |
55 | 49 | 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 | + |
56 | 56 | updateIndex() |