From 0545242202ed0de02a310ab3d8259f919e458ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Tisza?= Date: Thu, 3 Mar 2016 00:04:10 +0000 Subject: [PATCH] Add missing warning parameter Change-Id: I03d2d56d56ed754beedc985533791207a12fa97c --- pywikibot/family.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pywikibot/family.py b/pywikibot/family.py index f430048101..d05e7a2faf 100644 --- a/pywikibot/family.py +++ b/pywikibot/family.py @@ -934,11 +934,11 @@ def load(fam=None): warn(u'Family name %s contains non-ascii characters' % cls.name, FamilyMaintenanceWarning) # FIXME: wikisource uses code '-' for www.wikisource.org - if not all(all(x in CODE_CHARACTERS for x in code) and - (cls.name == 'wikisource' or code[0] != '-') - for code in cls.langs.keys()): - warn(u'Family %s codes contains non-ascii characters', - FamilyMaintenanceWarning) + for code in cls.langs.keys(): + if not all(x in CODE_CHARACTERS for x in code) and \ + (cls.name == 'wikisource' or code[0] != '-'): + warn('Family %s code %s contains non-ascii characters' % + (cls.name, code), FamilyMaintenanceWarning) Family._families[fam] = cls return cls