From ebad5ed6c52737bbfd8258f7c46a3848046fb269 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 19 Jun 2008 09:08:58 +0000 Subject: [PATCH] minor fix --- mtail.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mtail.py b/mtail.py index 473d160..f266876 100755 --- a/mtail.py +++ b/mtail.py @@ -136,7 +136,11 @@ example: print sys.argv[0],": WARNING : no file in scope" self.format="%s" else: - self.margin=max(*[len(f) for f in filenames]) + if len(filenames)==1: + self.margin=len(filenames[0]) + else: + # this stupidly fails when there's only 1 file + self.margin=max(*[len(f) for f in filenames]) self.format="%%%ds"%self.margin if self.options.verbose: print 'Current set of files:',filenames -- 2.43.0