]> Git Repo - VerusCoin.git/commitdiff
Catch error when done reading files
authorSuhas Daftuar <[email protected]>
Thu, 11 Sep 2014 13:22:39 +0000 (09:22 -0400)
committerSuhas Daftuar <[email protected]>
Thu, 11 Sep 2014 13:22:39 +0000 (09:22 -0400)
contrib/linearize/linearize-data.py

index 383bb38198a705e7e7bf397622970a8e49323bef..3b5d198c149266afa6f7468c952607bc2ec44aec 100755 (executable)
@@ -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")):
This page took 0.022628 seconds and 4 git commands to generate.