Fix a broken syntax check.

This commit is contained in:
Eric S. Raymond 2009-09-02 15:33:02 +00:00
parent dd59b4bfbb
commit 7556849edb

View file

@ -864,11 +864,11 @@ def sanity_check(filename, lines):
# Check for fluky credit parts
for nav in WmllintIterator(lines, filename):
above = nav.ancestors()
if above and above[-1] == "about":
if above and above[-1] == "[entry]":
try:
(key, prefix, value, comment) = parse_attribute(nav.text)
if key == email and " " in value:
print '"%s", line %d: space in email name'
if key == "email" and " " in value:
print '"%s", line %d: space in email name' % (filename, nav.lineno+1)
except TypeError:
pass
# Sanity-check recruit and recruitment_pattern.