Mercurial > hg
diff mercurial/hgweb/hgweb_mod.py @ 5923:f39110afc039
hgweb: fix a stupid KeyError introduced in a0e20a5eba3c
Thanks to Christian Ebert for finding this. Also added a test to prevent this
from happening again.
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Tue, 22 Jan 2008 09:11:08 +0100 |
parents | d0576d065993 |
children | 3340aa5a64f7 |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Tue Jan 22 09:11:06 2008 +0100 +++ b/mercurial/hgweb/hgweb_mod.py Tue Jan 22 09:11:08 2008 +0100 @@ -212,7 +212,7 @@ req.form['cmd'] = [tmpl.cache['default']] cmd = req.form['cmd'][0] - if cmd == 'file' and 'raw' in req.form['style']: + if cmd == 'file' and 'raw' in req.form.get('style', []): webcommands.rawfile(self, req, tmpl) else: getattr(webcommands, cmd)(self, req, tmpl)