]> git.donarmstrong.com Git - lilypond.git/commitdiff
avoid cryptic StopIteration failure from make when 'make check' is run before 'make...
authorAdam Spiers <lilypond@adamspiers.org>
Sat, 5 Nov 2011 23:33:31 +0000 (23:33 +0000)
committerAdam Spiers <lilypond@adamspiers.org>
Mon, 28 Nov 2011 17:31:16 +0000 (17:31 +0000)
scripts/build/output-distance.py

index d2d55d77fab4cc0479869262e5116f06ac25fa71..941f879f478accc3a71ab92dc3a739fd13c5d47e 100755 (executable)
@@ -827,7 +827,15 @@ class ComparisonData:
     def compare_trees (self, dir1, dir2):
         self.compare_directories (dir1, dir2)
 
-        (root, dirs, files) = os.walk (dir1).next ()
+        try:
+            (root, dirs, files) = os.walk (dir1).next ()
+        except StopIteration:
+            if dir1.endswith("-baseline"):
+                sys.stderr.write("Failed to walk through %s. This can be caused by forgetting to run make test-baseline.\n" % dir1)
+            else:
+                sys.stderr.write("Failed to walk through %s; please check it exists.\n" % dir1)
+            sys.exit(1)
+
         for d in dirs:
             d1 = os.path.join (dir1, d)
             d2 = os.path.join (dir2, d)