diff --git a/autotools/check-news b/autotools/check-news index 879400c091e680ef85c0169d463bccd8270f06f3..51a0403acc7a5bc6574352ae40c1fbeccdcc5e89 100755 --- a/autotools/check-news +++ b/autotools/check-news @@ -51,7 +51,7 @@ def main(): if DASHES_RE.match(line): if not prevline.startswith("Version "): - raise Exception("Line %s: Invalid title" % (fileinput.lineno() - 1)) + raise Exception("Line %s: Invalid title" % (fileinput.filelineno() - 1)) expect_date = True elif expect_date: @@ -66,7 +66,8 @@ def main(): m = RELEASED_RE.match(line) if not m: - raise Exception("Line %s: Invalid release line" % fileinput.lineno()) + raise Exception("Line %s: Invalid release line" % + fileinput.filelineno()) # Including the weekday in the date string does not work as time.strptime # would return an inconsistent result if the weekday is incorrect. @@ -77,7 +78,8 @@ def main(): # Check weekday if m.group("day") != weekday: raise Exception("Line %s: %s was/is a %s, not %s" % - (fileinput.lineno(), parsed, weekday, m.group("day"))) + (fileinput.filelineno(), parsed, weekday, + m.group("day"))) expect_date = False