changeset 142:d9f332f85673

Handle YA corner case.
author Bryan O'Sullivan <bos@serpentine.com>
date Tue, 06 Mar 2007 21:40:30 -0800
parents 627effec9d4e
children f2aabd15dd50
files en/examples/run-example
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/en/examples/run-example	Tue Mar 06 21:36:14 2007 -0800
+++ b/en/examples/run-example	Tue Mar 06 21:40:30 2007 -0800
@@ -322,7 +322,13 @@
         if name.endswith('.out') or name.endswith('~'): continue
         if name.endswith('.run'): continue
         pathname = os.path.join(path, name)
-        st = os.lstat(pathname)
+        try:
+            st = os.lstat(pathname)
+        except OSError, err:
+            # could be an output file that was removed while we ran
+            if err.errno != errno.ENOENT:
+                raise
+            continue
         if stat.S_ISREG(st.st_mode) and st.st_mode & 0111:
             if example(pathname, verbose).run():
                 errs += 1