Browse Source

Catch error when done reading files

tags/v0.15.1
Suhas Daftuar 7 years ago
parent
commit
07d5287f42
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      contrib/linearize/linearize-data.py

+ 5
- 1
contrib/linearize/linearize-data.py View File

@@ -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")):

Loading…
Cancel
Save