http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10396
Revision: 10396 Author: xqt Date: 2012-06-20 22:37:58 +0000 (Wed, 20 Jun 2012) Log Message: ----------- fix identation error, replace site() method with site property
Modified Paths: -------------- trunk/pywikipedia/titletranslate.py
Modified: trunk/pywikipedia/titletranslate.py =================================================================== --- trunk/pywikipedia/titletranslate.py 2012-06-20 22:19:15 UTC (rev 10395) +++ trunk/pywikipedia/titletranslate.py 2012-06-20 22:37:58 UTC (rev 10396) @@ -18,7 +18,7 @@ if x not in result: result.append(x)
-def translate(page, hints = None, auto = True, removebrackets = False, site = None, family = None): +def translate(page, hints=None, auto=True, removebrackets=False, site=None, family=None): """ Goes through all entries in 'hints'. Returns a list of pages.
@@ -32,11 +32,11 @@ """ result = [] if site is None and page: - site = page.site() + site = page.site if family is None and site: - family = site.family + family = site.family if site: - sitelang = site.language() + sitelang = site.language() if hints: for h in hints: if ':' not in h: @@ -135,7 +135,7 @@ """ result = [] pywikibot.output(u'getting poisoned links for %s' % pl.title()) - dictName, value = date.getAutoFormat(pl.site().language(), pl.title()) + dictName, value = date.getAutoFormat(pl.site.language(), pl.title()) if dictName is not None: pywikibot.output( u'date found in %s' % dictName ) # errors in year BC
pywikipedia-svn@lists.wikimedia.org