Print correctly the first filename

It was not splitting the extension
This commit is contained in:
Lauro Moura 2019-04-24 15:36:13 -03:00
parent 5f0cc9df1d
commit a873c115e0
1 changed files with 3 additions and 2 deletions

View File

@ -70,8 +70,9 @@ def report_text():
fmtsize = len(options.format % {"value": 12345.67, "percentual": 1234.56})
hdrfmt = "%%%d.%ds" % (fmtsize, fmtsize)
print(test_name_fmt % "\\", end=' ')
print("%7.7s" % (files[0][-7:],), end=' ')
print(test_name_fmt % "Files", end=' ')
first_filename, _ = os.path.splitext(files[0])
print("%7.7s" % (first_filename[-7:],), end=' ')
for f in files[1:]:
n, e = os.path.splitext(f)
print(hdrfmt % n[-fmtsize:], end=' ')