Revision: 5690 Author: filnik Date: 2008-07-07 10:23:08 +0000 (Mon, 07 Jul 2008)
Log Message: ----------- Bugfix
Modified Paths: -------------- trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py =================================================================== --- trunk/pywikipedia/checkimages.py 2008-07-06 20:26:05 UTC (rev 5689) +++ trunk/pywikipedia/checkimages.py 2008-07-07 10:23:08 UTC (rev 5690) @@ -1123,11 +1123,12 @@ hiddentemplate.append('#if:') # Hidden template loading pageHidden = wikipedia.translate(site, PageWithHiddenTemplates) - try: - pageHiddenText = wikipedia.Page(site, pageHidden).get() - except (wikipedia.NoPage, wikipedia.IsRedirectPage): - pageHiddenText = '' - hiddentemplate.extend(mainClass.load(pageHiddenText)) + if pageHidden != None: + try: + pageHiddenText = wikipedia.Page(site, pageHidden).get() + except (wikipedia.NoPage, wikipedia.IsRedirectPage): + pageHiddenText = '' + hiddentemplate.extend(mainClass.load(pageHiddenText)) # Not the main, but the most important loop. #parsed = False for image in generator: