jenkins-bot has submitted this change and it was merged.
Change subject: [bugfix] Don't break sametitle method with empty titles ......................................................................
[bugfix] Don't break sametitle method with empty titles
Bug: T88800 Change-Id: I9a867404a02325660a9822b013e3a72eef160742 --- M pywikibot/site.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index 6a9d50c..2a347bb 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -914,8 +914,8 @@ # If the namespace has a case definition it's overriding the site's # case definition if (ns1_obj.case if hasattr(ns1_obj, 'case') else self.case()) == 'first-letter': - name1 = name1[0].upper() + name1[1:] - name2 = name2[0].upper() + name2[1:] + name1 = name1[:1].upper() + name1[1:] + name2 = name2[:1].upper() + name2[1:] return name1 == name2
# namespace shortcuts for backwards-compatibility
pywikibot-commits@lists.wikimedia.org