Revision: 7582 Author: xqt Date: 2009-11-02 18:43:03 +0000 (Mon, 02 Nov 2009)
Log Message: ----------- IOError exception handling when reading from dump
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2009-11-02 18:34:37 UTC (rev 7581) +++ trunk/pywikipedia/interwiki.py 2009-11-02 18:43:03 UTC (rev 7582) @@ -1735,7 +1735,11 @@ for i in range(number): try: while True: - page = self.pageGenerator.next() + try: + page = self.pageGenerator.next() + except IOError: + pywikibot.output(u'IOError occured; skipping') + continue if page in globalvar.skip: pywikibot.output(u'Skipping: %s is in the skip list' % page.title()) continue
pywikipedia-svn@lists.wikimedia.org