https://bugzilla.wikimedia.org/show_bug.cgi?id=69342
Bug ID: 69342 Summary: Wild card '*' for lang in user_config does not allow login Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: login.py Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: mpaa.wiki@gmail.com Web browser: --- Mobile Platform: ---
With this settings in user_config.py: usernames['wikipedia']['*'] = u'Mpaa' cannot login, while it can with: usernames['wikipedia']['en'] = u'Mpaa'
The try clause in login.py fails because self.site.code is 'en' and not '*'. KeyError is raised (BTW it should be except KeyError ....)
try: self.username = config.usernames[ self.site.family.name][self.site.code] except: raise NoUsername(u"""\ ERROR: Username for %(fam_name)s:%(wiki_code)s is undefined. If you have an account for that site, please add a line to user-config.py:
usernames['%(fam_name)s']['%(wiki_code)s'] = 'myUsername'""" % {'fam_name': self.site.family.name, 'wiki_code': self.site.code})
https://bugzilla.wikimedia.org/show_bug.cgi?id=69342
--- Comment #1 from Mpaa mpaa.wiki@gmail.com --- Might not be a bug if this sentences in user_cong.py/cinfig2.py are not True ...
# The dictionary usernames should contain a username for each site where you # have a bot account. If you have a unique username for all languages of a # family , you can use '*'
or
# If you have a unique username for all languages of a family, # you can use '*'
https://bugzilla.wikimedia.org/show_bug.cgi?id=69342
--- Comment #2 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 156987 had a related patch set uploaded by John Vandenberg: Wild card '*' in user-config does not allow login
https://gerrit.wikimedia.org/r/156987
https://bugzilla.wikimedia.org/show_bug.cgi?id=69342
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=69342
--- Comment #3 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 156987 merged by jenkins-bot: Wild card '*' in user-config does not allow login
https://gerrit.wikimedia.org/r/156987
https://bugzilla.wikimedia.org/show_bug.cgi?id=69342
Mpaa mpaa.wiki@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
pywikipedia-bugs@lists.wikimedia.org