Use .has_option to avoid the unknown Exception.
authorOllivier Robert <roberto@keltia.freenix.fr>
Sat, 27 Aug 2005 23:44:02 -0700
changeset 1122 fb008a1a0a32
parent 1121 14a69c4988cd
child 1123 457c23af92bd
Use .has_option to avoid the unknown Exception.
mercurial/hgweb.py
--- a/mercurial/hgweb.py	Sat Aug 27 23:43:13 2005 -0700
+++ b/mercurial/hgweb.py	Sat Aug 27 23:44:02 2005 -0700
@@ -945,12 +945,12 @@
         virtual = virtual.strip('/')
 
         if len(virtual):
-            try:
+            if self.cp.has_option("paths", virtual):
                 real = self.cp.get("paths", virtual)
                 h = hgweb(real)
                 h.run()
                 return
-            except:
+            else:
                 httpnotfound(virtual)
                 return