Merge pull request #4896

07d5287 Catch error when done reading files (Suhas Daftuar)
This commit is contained in:
Wladimir J. van der Laan 2014-09-12 19:04:49 +02:00
commit e5fc6631b9
No known key found for this signature in database
GPG key ID: 74810B012346C9A6

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