don't use python3 syntax in python2

This commit is contained in:
Franzi 2021-05-26 08:55:57 +02:00
parent 5e843e5ea7
commit 0307fe42f3
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -35,11 +35,15 @@ def limit_output_lines(output, num_lines=10):
return output return output
more = actual-(num_lines-1) more = actual-(num_lines-1)
if more > 1:
s = 's'
else:
s = ''
result = output[:(num_lines-1)] result = output[:(num_lines-1)]
result.append('... and {} more line{s}'.format( result.append('... and {} more line{}'.format(
more, more,
's' if more > 1 else '', s,
)) ))
return result return result