http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10986
Revision: 10986
Author: xqt
Date: 2013-01-26 17:23:40 +0000 (Sat, 26 Jan 2013)
Log Message:
-----------
check for NoPage exception while waiting for next page
Modified Paths:
--------------
trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py
===================================================================
--- trunk/pywikipedia/checkimages.py 2013-01-25 15:11:32 UTC (rev 10985)
+++ trunk/pywikipedia/checkimages.py 2013-01-26 17:23:40 UTC (rev 10986)
@@ -1478,7 +1478,10 @@
while True:
loadOtherImages = True # ensure that all the images loaded aren't to
skip!
for image in generator:
- timestamp = image.getLatestUploader()[1]
+ try:
+ timestamp = image.getLatestUploader()[1]
+ except pywikibot.NoPage:
+ continue
img_time = datetime.datetime.strptime(timestamp,
u"%Y-%m-%dT%H:%M:%SZ") #not relative to localtime