jenkins-bot has submitted this change and it was merged.
Change subject: remove obsolete function ItemPage.__make_site()
......................................................................
remove obsolete function ItemPage.__make_site()
it is hackish, as it only supports Wikipedia, and unused,
since ItemPage.iterlinks() uses APISite.fromDBName()
Change-Id: I13c9756b84137449f283153b45999e331b01000c
---
M pywikibot/page.py
1 file changed, 0 insertions(+), 14 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 66371e2..711acf4 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2635,15 +2635,6 @@
i._title = page.title()
return i
- def __make_site(self, dbname):
- """
- Converts a Site.dbName() into a Site object.
- Rather hackish method that only works for WMF sites
- """
- lang = dbname.replace('wiki', '')
- lang = lang.replace('_', '-')
- return pywikibot.Site(lang, 'wikipedia')
-
def get(self, force=False, *args):
"""
Fetches all page data, and caches it
@@ -2666,11 +2657,6 @@
self.sitelinks = {}
if 'sitelinks' in self._content:
for dbname in self._content['sitelinks']:
- # Due to issues with locked/obsolete sites
- # this part is commented out
- #site = self.__make_site(dbname)
- #self.sitelinks[site] = pywikibot.Page(
- # site, self._content['sitelinks'][dbname]['title'])
self.sitelinks[dbname] = self._content[
'sitelinks'][dbname]['title']
--
To view, visit
https://gerrit.wikimedia.org/r/131716
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I13c9756b84137449f283153b45999e331b01000c
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <ricordisamoa(a)live.it>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>