Revision: 7935 Author: xqt Date: 2010-02-15 14:49:55 +0000 (Mon, 15 Feb 2010)
Log Message: ----------- isCategoryRedirect() returns False if page does not exists (instead beaking the job)
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2010-02-15 13:49:12 UTC (rev 7934) +++ trunk/pywikipedia/wikipedia.py 2010-02-15 14:49:55 UTC (rev 7935) @@ -1205,7 +1205,10 @@ return False if not hasattr(self, "_catredirect"): if not text: - text = self.get(get_redirect=True) + try: + text = self.get(get_redirect=True) + except NoPage: + return False catredirs = self.site().category_redirects() for (t, args) in self.templatesWithParams(thistxt=text): template = Page(self.site(), t, defaultNamespace=10