Revision: 6419 Author: nicdumz Date: 2009-02-23 05:11:14 +0000 (Mon, 23 Feb 2009)
Log Message: ----------- titleWithoutNamespace is obsolete, replacing the calls by title(withNamespace=False)
Modified Paths: -------------- branches/rewrite/pywikibot/login.py branches/rewrite/pywikibot/pagegenerators.py branches/rewrite/pywikibot/textlib.py
Modified: branches/rewrite/pywikibot/login.py =================================================================== --- branches/rewrite/pywikibot/login.py 2009-02-23 04:52:02 UTC (rev 6418) +++ branches/rewrite/pywikibot/login.py 2009-02-23 05:11:14 UTC (rev 6419) @@ -115,7 +115,7 @@ botListPageTitle = botList[self.site.family.name][self.site.code] botListPage = pywikibot.Page(self.site, botListPageTitle) for linkedPage in botListPage.linkedPages(): - if linkedPage.titleWithoutNamespace() == self.username: + if linkedPage.title(withNamespace=False) == self.username: return True return False else:
Modified: branches/rewrite/pywikibot/pagegenerators.py =================================================================== --- branches/rewrite/pywikibot/pagegenerators.py 2009-02-23 04:52:02 UTC (rev 6418) +++ branches/rewrite/pywikibot/pagegenerators.py 2009-02-23 05:11:14 UTC (rev 6419) @@ -616,7 +616,7 @@ """Yield pages from another generator whose titles match regex.""" reg = re.compile(regex, re.I) for page in generator: - if reg.match(page.titleWithoutNamespace()): + if reg.match(page.title(withNamespace=False)): yield page
Modified: branches/rewrite/pywikibot/textlib.py =================================================================== --- branches/rewrite/pywikibot/textlib.py 2009-02-23 04:52:02 UTC (rev 6418) +++ branches/rewrite/pywikibot/textlib.py 2009-02-23 05:11:14 UTC (rev 6419) @@ -541,7 +541,7 @@ site = pywikibot.getSite()
catNamespace = '|'.join(site.category_namespaces()) - title = oldcat.titleWithoutNamespace() + title = oldcat.title(withNamespace=False) if not title: return # title might contain regex special characters @@ -559,7 +559,7 @@ else: text = replaceExcept(oldtext, categoryR, '[[%s:%s\2' % (site.namespace(14), - newcat.titleWithoutNamespace()), + newcat.title(withNamespace=False)), ['nowiki', 'comment', 'math', 'pre', 'source']) return text