hgbook
changeset 142:d9f332f85673
Handle YA corner case.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue Mar 06 21:40:30 2007 -0800 (2007-03-06) |
parents | 627effec9d4e |
children | f2aabd15dd50 |
files | en/examples/run-example |
line diff
1.1 --- a/en/examples/run-example Tue Mar 06 21:36:14 2007 -0800 1.2 +++ b/en/examples/run-example Tue Mar 06 21:40:30 2007 -0800 1.3 @@ -322,7 +322,13 @@ 1.4 if name.endswith('.out') or name.endswith('~'): continue 1.5 if name.endswith('.run'): continue 1.6 pathname = os.path.join(path, name) 1.7 - st = os.lstat(pathname) 1.8 + try: 1.9 + st = os.lstat(pathname) 1.10 + except OSError, err: 1.11 + # could be an output file that was removed while we ran 1.12 + if err.errno != errno.ENOENT: 1.13 + raise 1.14 + continue 1.15 if stat.S_ISREG(st.st_mode) and st.st_mode & 0111: 1.16 if example(pathname, verbose).run(): 1.17 errs += 1