[PATCH 4 of 15] Don't use exception but has_option
vincent at ricardis.tudelft.nl
vincent at ricardis.tudelft.nl
Wed Aug 24 16:49:12 CDT 2005
Patch subject is complete summary.
# HG changeset patch
# User Vincent Wagelaar <vincent at ricardis.tudelft.nl>
# Node ID 6b6582fb7c89aeba6d67fcfbe3cfcfb8fbe091a6
# Parent 97a6abc2f90c2d3b9e46f7f17fccad5fca675aac
Don't use exception but has_option
diff -r 97a6abc2f90c -r 6b6582fb7c89 mercurial/hgweb.py
--- a/mercurial/hgweb.py Wed Aug 24 13:17:33 2005
+++ b/mercurial/hgweb.py Wed Aug 24 13:24:25 2005
@@ -844,12 +844,12 @@
virtual = virtual.strip('/')
templates = self.templates or templatepath()
if len(virtual):
- try:
+ if self.cp.has_option("paths", virtual):
real = self.cp.get("paths", virtual)
h = hgweb(real, None, templates)
h.run(stdin, stdout, env)
return
- except NoOptionError:
+ else:
httpnotfound(stdout, virtual)
return
More information about the Mercurial
mailing list