]> git.donarmstrong.com Git - lilypond.git/commitdiff
Script: trap file not found
authorTrevor Daniels <t.daniels@treda.co.uk>
Fri, 20 Aug 2010 08:19:33 +0000 (09:19 +0100)
committerTrevor Daniels <t.daniels@treda.co.uk>
Fri, 20 Aug 2010 08:19:33 +0000 (09:19 +0100)
scripts/auxiliar/ref_check.py

index 8050272d9fbed687e44f79b3076912fff400b564..48bc4d6e10d11176f2e6204e8a19ea65a3ca3649 100755 (executable)
@@ -94,7 +94,11 @@ class File:
     """ Process File """
 
     skip = False
-    myfile = open(self.fullFileName, 'r')
+    try:
+      myfile = open(self.fullFileName, 'r')
+    except IOError:
+      print "File ", self.fullFileName, " referenced in ", File.CurrentManualName, " but not found"
+      return
     remainderLine = ""
     lineNo = 0
     for line in myfile: