Index: trunk/backup/WikiDump.py |
— | — | @@ -139,19 +139,15 @@ |
140 | 140 | available = [] |
141 | 141 | for db in self.dbList: |
142 | 142 | wiki = Wiki(self, db) |
| 143 | + age = sys.maxint |
143 | 144 | last = wiki.latestDump() |
144 | 145 | if last: |
145 | | - dumpDir = os.path.join(wiki.publicDir(), last) |
| 146 | + dumpStatus = os.path.join(wiki.publicDir(), last, "status.html") |
146 | 147 | try: |
147 | | - age = fileAge(dumpDir) |
| 148 | + age = fileAge(dumpStatus) |
148 | 149 | except: |
149 | | - print "dump dir %s vanished while looking at it!" % dumpDir |
150 | | - available.append((sys.maxint, db)) |
151 | | - else: |
152 | | - position = -1 |
153 | | - available.append((age, db)) |
154 | | - else: |
155 | | - available.append((sys.maxint, db)) |
| 150 | + print "dump dir %s corrupt?" % dumpDir |
| 151 | + available.append((age, db)) |
156 | 152 | available.sort() |
157 | 153 | return [db for (age, db) in available] |
158 | 154 | |