Mercurial > bitten > bitten-test
changeset 578:0a221cb3a860
0.6dev: A wrongly typed `build:` wiki-link (like `build:Hello`) should not crash rendering of the whole page with `ValueError` and possible traceback. Now any such links are just ignored.
author | osimons |
---|---|
date | Tue, 07 Jul 2009 22:26:01 +0000 |
parents | dcee8ff20e82 |
children | 4ddf60f40a1f |
files | bitten/main.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/main.py +++ b/bitten/main.py @@ -92,7 +92,11 @@ def get_link_resolvers(self): def _format_link(formatter, ns, name, label): - build = Build.fetch(self.env, int(name)) + try: + name = int(name) + except ValueError: + return label + build = Build.fetch(self.env, name) if build: config = BuildConfig.fetch(self.env, build.config) title = 'Build %d ([%s] of %s) by %s' % (build.id, build.rev,