http://www.mediawiki.org/wiki/Special:Code/MediaWiki/82816
Revision: 82816
Author: ariel
Date: 2011-02-25 20:25:10 +0000 (Fri, 25 Feb 2011)
Log Message:
-----------
proper initialization of vars when no previous dumps found
Modified Paths:
--------------
branches/ariel/xmldumps-backup/worker.py
Modified: branches/ariel/xmldumps-backup/worker.py
===================================================================
--- branches/ariel/xmldumps-backup/worker.py 2011-02-25 20:24:08 UTC (rev
82815)
+++ branches/ariel/xmldumps-backup/worker.py 2011-02-25 20:25:10 UTC (rev
82816)
@@ -1476,12 +1476,14 @@
# Try to pull text from the previous run; most stuff hasn't
changed
#Source=$OutputDir/pages_$section.xml.bz2
sources = []
+ possibleSources = None
if self._prefetch:
possibleSources = self._findPreviousDump(runner, chunk)
# if we have a list of more than one then we need to
check existence for each and put them together in a string
- for sourceFile in possibleSources:
- if exists(sourceFile):
- sources.append(sourceFile)
+ if possibleSources:
+ for sourceFile in possibleSources:
+ if exists(sourceFile):
+ sources.append(sourceFile)
if (len(sources) > 0):
source = "bzip2:%s" % (";".join(sources) )
runner.showRunnerState("... building %s %s XML dump,
with text prefetch from %s..." % (self._subset, chunkinfo, source))
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs