[PATCH] hgweb_mod: fix key error on file display
Christian Ebert
blacktrash at gmx.net
Sat Jan 19 21:10:37 CST 2008
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1200798507 -3600
# Node ID 6e58ced7644ab291ca0771101f0c775059462820
# Parent b9a830fa10f6d8d2407107530b5306124c8fc181
hgweb_mod: fix key error on file display
diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -212,7 +212,8 @@
req.form['cmd'] = [tmpl.cache['default']]
cmd = req.form['cmd'][0]
- if cmd == 'file' and 'raw' in req.form['style']:
+ if (cmd == 'file' and
+ req.form.has_key('style') and 'raw' in req.form['style']):
webcommands.rawfile(self, req, tmpl)
else:
getattr(webcommands, cmd)(self, req, tmpl)
More information about the Mercurial-devel
mailing list