launcher.py: Avoid shell=True to consume half as many processes

No idea if "python2" will be converted to anything meaningful on Windows,
but then you're not really supposed to use the shell either in that dungeon.
https://docs.python.org/2.7/library/subprocess.html#subprocess.Popen
pull/378/head
Federico Leva 4 years ago
parent 0f5664028f
commit e4524b8aec

@ -82,9 +82,9 @@ def main():
# typically they don't provide any crawl-delay value in their robots.txt).
if started and wikidir: #then resume
print 'Resuming download, using directory', wikidir
subprocess.call('./dumpgenerator.py --api=%s --xml --images --resume --path=%s' % (wiki, wikidir), shell=True)
subprocess.call(['python2', 'dumpgenerator.py', '--api={}'.format(wiki), '--xml', '--images', '--resume', '--path={}'.format(wikidir)], shell=False)
else: #download from scratch
subprocess.call('./dumpgenerator.py --api=%s --xml --images --delay=1' % wiki, shell=True)
subprocess.call(['python2', 'dumpgenerator.py', '--api={}'.format(wiki), '--xml', '--images'], shell=False)
started = True
#save wikidir now
for f in os.listdir('.'):

Loading…
Cancel
Save