jenkins-bot has submitted this change and it was merged.
Change subject: replace underscores with spaces in BaseSite._username ......................................................................
replace underscores with spaces in BaseSite._username
Following bug 61832 comment 3 suggestion a)
Change-Id: Ibaa00e00bc61c734955e1377604241541eab336b --- M pywikibot/site.py 1 file changed, 5 insertions(+), 0 deletions(-)
Approvals: John Vandenberg: Looks good to me, but someone else must approve Ricordisamoa: Looks good to me, approved jenkins-bot: Verified
Objections: Xqt: There's a problem with this change, please improve
diff --git a/pywikibot/site.py b/pywikibot/site.py index 78196a5..7fdc9d2 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -155,7 +155,12 @@ user = user[0].upper() + user[1:] if sysop: sysop = sysop[0].upper() + sysop[1:] + if user: + user = user.replace('_', ' ') + if sysop: + sysop = sysop.replace('_', ' ') self._username = [user, sysop] + self.use_hard_category_redirects = ( self.code in self.family.use_hard_category_redirects)
pywikibot-commits@lists.wikimedia.org