Last modified: 2014-05-06 00:41:42 UTC
print list(pywikibot.Page(pywikibot.getSite("af"), "Maan").iterlanglinks()) raises NoSuchSite exception I actually encountered this problem when I ran featured.py. It seems that there is an attempt (gerrit: 112322) to fix this problem, but the problem still persists.
Oh! I forgot to mention that the above code fails because iterlanglinks() will call pywikibot.Link.langlinkUnsafe. There are two places calling pywikibot.Link.langlinkUnsafe: in iterlanglinks() and in update_page() from api.py. I don't which way is better between putting try-except block inside pywikibot.Link.langlinkUnsafe directly, and putting try-except block in caller functions over pywikibot.Link.langlinkUnsafe.
Change 112842 had a related patch set uploaded by Nullzero: Prevent NoSuchSite error from reading obsolete site's language link https://gerrit.wikimedia.org/r/112842
Change 112842 merged by jenkins-bot: Make obsolete site object can be created https://gerrit.wikimedia.org/r/112842
Patch reverted with https://gerrit.wikimedia.org/r/#/c/119277/
Merged