aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@chaincode.com>2014-09-11 09:22:39 -0400
committerSuhas Daftuar <sdaftuar@chaincode.com>2014-09-11 09:22:39 -0400
commit07d5287f42ececa2e059724c7c5bba55c8658bc6 (patch)
tree3d3bcb8a4710349fddd4fe55de769f8540264b39
parentdf623d83dad6aa39141b066ebd2f870ee05acf41 (diff)
Catch error when done reading files
-rwxr-xr-xcontrib/linearize/linearize-data.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index 383bb38198..3b5d198c14 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -110,7 +110,11 @@ def copydata(settings, blkindex, blkset):
if not inF:
fname = "%s/blk%05d.dat" % (settings['input'], inFn)
print("Input file" + fname)
- inF = open(fname, "rb")
+ try:
+ inF = open(fname, "rb")
+ except IOError:
+ print "Done"
+ return
inhdr = inF.read(8)
if (not inhdr or (inhdr[0] == "\0")):