diff -r 8e7796a990c5 -r d0576d065993 mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Mon Jan 21 13:37:27 2008 -0200 +++ b/mercurial/hgweb/hgwebdir_mod.py Sun Jan 20 14:39:25 2008 +0100 @@ -143,7 +143,7 @@ def entries(sortcolumn="", descending=False, subdir="", **map): def sessionvars(**map): fields = [] - if req.form.has_key('style'): + if 'style' in req.form: style = req.form['style'][0] if style != get('web', 'style', ''): fields.append(('style', style)) @@ -214,7 +214,7 @@ sortable = ["name", "description", "contact", "lastchange"] sortcolumn, descending = self.repos_sorted - if req.form.has_key('sort'): + if 'sort' in req.form: sortcolumn = req.form['sort'][0] descending = sortcolumn.startswith('-') if descending: @@ -262,7 +262,7 @@ style = self.style if style is None: style = config('web', 'style', '') - if req.form.has_key('style'): + if 'style' in req.form: style = req.form['style'][0] if self.stripecount is None: self.stripecount = int(config('web', 'stripes', 1))