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:
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.
# 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