Skip to content

Commit

Permalink
Merge "Add missing warning parameter"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Aug 24, 2016
2 parents 81a48b7 + 0545242 commit 38b919c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pywikibot/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 38b919c

Please sign in to comment.