mercurial/hgweb/webcommands.py
changeset 6669 782dbbdfb1d7
parent 6368 2c370f08c486
child 6670 be55b1a6d4b1
child 6853 2ff0829bdae5
--- a/mercurial/hgweb/webcommands.py	Thu Jun 12 00:11:09 2008 -0700
+++ b/mercurial/hgweb/webcommands.py	Fri Jun 13 12:33:40 2008 +0200
@@ -109,7 +109,7 @@
     return web.filelog(tmpl, web.filectx(req))
 
 def archive(web, req, tmpl):
-    type_ = req.form['type'][0]
+    type_ = req.form.get('type', [None])[0]
     allowed = web.configlist("web", "allow_archive")
     if (type_ in web.archives and (type_ in allowed or
         web.configbool("web", "allow" + type_, False))):