hgbook
diff en/examples/run-example @ 155:914babdc99c8
run-example: better error if bogus section name found.
Fix all such bogus names in sources.
Fix all such bogus names in sources.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon Mar 12 23:10:32 2007 -0700 (2007-03-12) |
parents | e7f48702d409 |
children | 745ff473c8c4 |
line diff
1.1 --- a/en/examples/run-example Mon Mar 12 22:56:29 2007 -0700 1.2 +++ b/en/examples/run-example Mon Mar 12 23:10:32 2007 -0700 1.3 @@ -203,7 +203,11 @@ 1.4 if pi == 'name': 1.5 self.status('.') 1.6 out = rest 1.7 - assert out not in ('err', 'lxo', 'out', 'run', 'tmp') 1.8 + if out in ('err', 'lxo', 'out', 'run', 'tmp'): 1.9 + print >> sys.stderr, ('%s: illegal section ' 1.10 + 'name %r' % 1.11 + (self.name, out)) 1.12 + return 1 1.13 assert os.sep not in out 1.14 if ofp is not None: 1.15 ofp.close()