From: Thierry Parmentelat Date: Thu, 19 Jun 2008 09:08:58 +0000 (+0000) Subject: minor fix X-Git-Tag: MyPLC-4.3-1~19 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ebad5ed6c52737bbfd8258f7c46a3848046fb269;p=myplc.git minor fix --- 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