From 0307fe42f3679ae7da3e4aa837530892ee0b19a2 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Wed, 26 May 2021 08:55:57 +0200 Subject: [PATCH] don't use python3 syntax in python2 --- service | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/service b/service index b1f29c5..e6c29cc 100755 --- a/service +++ b/service @@ -35,11 +35,15 @@ def limit_output_lines(output, num_lines=10): return output more = actual-(num_lines-1) + if more > 1: + s = 's' + else: + s = '' result = output[:(num_lines-1)] - result.append('... and {} more line{s}'.format( + result.append('... and {} more line{}'.format( more, - 's' if more > 1 else '', + s, )) return result