Use .has_option to avoid the unknown Exception.

This commit is contained in:
Ollivier Robert 2005-08-27 23:44:02 -07:00
parent e7d03166de
commit 19c2c58ce2

View File

@ -945,12 +945,12 @@ class hgwebdir:
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