summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-08-02 16:53:10 +0100
committerLars Wirzenius <liw@liw.fi>2011-08-02 16:53:10 +0100
commite56f6d3f24e0f295537c3f676b289be2c6f44c82 (patch)
tree211c34d1d4003706edf16e8f61ca8bd6243f67ef
parent5dc1b4d0787357390a92a975c4cab54e776550fd (diff)
downloadseivot-e56f6d3f24e0f295537c3f676b289be2c6f44c82.tar.gz
Notify user which .seivot file is broken, if any.
-rwxr-xr-xseivots-summary9
1 files changed, 8 insertions, 1 deletions
diff --git a/seivots-summary b/seivots-summary
index c60a9f3..12bbf69 100755
--- a/seivots-summary
+++ b/seivots-summary
@@ -19,6 +19,7 @@ import cliapp
import ConfigParser
import logging
import os
+import sys
class Table(object):
@@ -81,7 +82,13 @@ class Table(object):
class SeivotsSummary(cliapp.Application):
def process_args(self, args):
- seivots = [self.read_seivot(x) for x in args]
+ seivots = []
+ for filename in args:
+ try:
+ seivots.append(self.read_seivot(filename))
+ except ConfigParser.NoSectionError:
+ sys.stderr.write('Ignoring %s: not a proper seivot file\n' %
+ filename)
sizes = self.find_initial_sizes(seivots)
for size in sorted(sizes):