jenkins-bot has submitted this change and it was merged.
Change subject: welcome.py: fix comparison with families ......................................................................
welcome.py: fix comparison with families
site.family returns a Family() object, not a string. site.family.name should be used for string comparison.
Change-Id: I26627c1fa9da90a63934a937c45d95490a326fb3 --- M scripts/welcome.py 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/welcome.py b/scripts/welcome.py index 37f3956..b5fa34b 100644 --- a/scripts/welcome.py +++ b/scripts/welcome.py @@ -738,15 +738,15 @@ continue welcome_text = i18n.translate(self.site, netext) if globalvar.randomSign: - if self.site.family != 'wikinews': + if self.site.family.name != 'wikinews': welcome_text = (welcome_text % choice(self.defineSign())) - if self.site.family == 'wiktionary' and \ + if self.site.family.name == 'wiktionary' and \ self.site.code == 'it': pass else: welcome_text += timeselected - elif (self.site.family != 'wikinews' and + elif (self.site.family.name != 'wikinews' and self.site.code != 'it'): welcome_text = (welcome_text % globalvar.defaultSign)
pywikibot-commits@lists.wikimedia.org