Last modified: 2014-08-29 07:55:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71342, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69342 - Wild card '*' for lang in user_config does not allow login
Wild card '*' for lang in user_config does not allow login
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
login.py (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-09 14:16 UTC by Mpaa
Modified: 2014-08-29 07:55 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Mpaa 2014-08-09 14:16:10 UTC
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})
Comment 1 Mpaa 2014-08-09 20:53:00 UTC
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 '*'
Comment 2 Gerrit Notification Bot 2014-08-29 00:29:36 UTC
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
Comment 3 Gerrit Notification Bot 2014-08-29 01:29:59 UTC
Change 156987 merged by jenkins-bot:
Wild card '*' in user-config does not allow login

https://gerrit.wikimedia.org/r/156987

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links