http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10395
Revision: 10395 Author: xqt Date: 2012-06-20 22:19:15 +0000 (Wed, 20 Jun 2012) Log Message: ----------- enable (explicit) -force login, follow up for r10284 and bug #3535184
Modified Paths: -------------- branches/rewrite/scripts/login.py
Modified: branches/rewrite/scripts/login.py =================================================================== --- branches/rewrite/scripts/login.py 2012-06-20 20:44:22 UTC (rev 10394) +++ branches/rewrite/scripts/login.py 2012-06-20 22:19:15 UTC (rev 10395) @@ -50,10 +50,7 @@ import pywikibot from pywikibot import config, deprecate_arg from pywikibot.exceptions import NoSuchSite, NoUsername -from pywikibot.login import LoginManager
-_logger = "wiki.login" - def main(*args): password = None sysop = False @@ -87,6 +84,8 @@ for lang in namedict[familyName]: try: site = pywikibot.getSite(code=lang, fam=familyName) + if forceLogin: + site.login() if site.logged_in(sysop) \ and site.user() == site.username(sysop): pywikibot.output(u"Login successful on %(site)s." % locals())
pywikipedia-svn@lists.wikimedia.org