Merge pull request #4896
07d5287
Catch error when done reading files (Suhas Daftuar)
This commit is contained in:
commit
e5fc6631b9
1 changed files with 5 additions and 1 deletions
|
@ -110,7 +110,11 @@ def copydata(settings, blkindex, blkset):
|
||||||
if not inF:
|
if not inF:
|
||||||
fname = "%s/blk%05d.dat" % (settings['input'], inFn)
|
fname = "%s/blk%05d.dat" % (settings['input'], inFn)
|
||||||
print("Input file" + fname)
|
print("Input file" + fname)
|
||||||
|
try:
|
||||||
inF = open(fname, "rb")
|
inF = open(fname, "rb")
|
||||||
|
except IOError:
|
||||||
|
print "Done"
|
||||||
|
return
|
||||||
|
|
||||||
inhdr = inF.read(8)
|
inhdr = inF.read(8)
|
||||||
if (not inhdr or (inhdr[0] == "\0")):
|
if (not inhdr or (inhdr[0] == "\0")):
|
||||||
|
|
Loading…
Reference in a new issue