changeset 1119:7fca9752d945

Protect against unknown repositories.
author roberto@keltia.freenix.fr
date Sat, 27 Aug 2005 23:42:51 -0700
parents 63b5f68d8167
children df25ee778ac2
files mercurial/hgweb.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb.py	Sat Aug 27 23:10:49 2005 -0700
+++ b/mercurial/hgweb.py	Sat Aug 27 23:42:51 2005 -0700
@@ -939,10 +939,11 @@
             virtual = ""
 
         if virtual[1:]:
-            real = self.cp.get("paths", virtual[1:])
-            h = hgweb(real)
-            h.run()
-            return
+            if self.cp.has_option("paths", virtual[1:]):
+                real = self.cp.get("paths", virtual[1:])
+                h = hgweb(real)
+                h.run()
+                return
 
         def header(**map):
             yield tmpl("header", **map)