Partial revert of r675: the script was always downloading only the last revision, as reported by Hydriz... *facepalms*

git-svn-id: https://wikiteam.googlecode.com/svn/trunk@709 31edc4fc-5e31-b4c4-d58b-c8bc928bcb95
pull/117/head
nemobis 12 years ago
parent 821bdaf974
commit 7e083de24b

@ -300,8 +300,8 @@ def getXMLPageCore(headers={}, params={}, config={}):
print ' MediaWiki error for "%s", network error or whatever...' % (params['pages'])
# If it's not already what we tried: our last chance, preserve only the last revision...
# config['curonly'] means that the whole dump is configured to save nonly the last
# params['curonly'] means that we've already tried this fallback, because it's set by the following if and passed to getXMLPageCore
if not config['curonly'] and not params['curonly']:
# params['curonly'] should mean that we've already tried this fallback, because it's set by the following if and passed to getXMLPageCore
if not config['curonly']:
print ' Trying to save only the last revision for this page...'
params['curonly'] = 1
logerror(config=config, text='Error while retrieving the full history of "%s". Trying to save only the last revision for this page' % (params['pages']))
@ -349,7 +349,6 @@ def getXMLPage(config={}, title='', verbose=True):
else:
params['offset'] = '1' # 1 always < 2000s
params['limit'] = limit
params['curonly'] = 0 # we need this to be defined, in getXMLPageCore
if config.has_key('templates') and config['templates']: #in other case, do not set params['templates']
params['templates'] = 1

Loading…
Cancel
Save