diff mercurial/hgweb/webcommands.py @ 5915:d0576d065993

Prefer i in d over d.has_key(i)
author Christian Ebert <blacktrash@gmx.net>
date Sun, 20 Jan 2008 14:39:25 +0100
parents a0e20a5eba3c
children c6274913eba5
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Mon Jan 21 13:37:27 2008 -0200
+++ b/mercurial/hgweb/webcommands.py	Sun Jan 20 14:39:25 2008 +0100
@@ -10,7 +10,7 @@
 from common import staticfile
 
 def log(web, req, tmpl):
-    if req.form.has_key('file') and req.form['file'][0]:
+    if 'file' in req.form and req.form['file'][0]:
         filelog(web, req, tmpl)
     else:
         changelog(web, req, tmpl)
@@ -48,10 +48,10 @@
     req.write(web.manifest(tmpl, web.changectx(req), path))
 
 def changelog(web, req, tmpl, shortlog = False):
-    if req.form.has_key('node'):
+    if 'node' in req.form:
         ctx = web.changectx(req)
     else:
-        if req.form.has_key('rev'):
+        if 'rev' in req.form:
             hi = req.form['rev'][0]
         else:
             hi = web.repo.changelog.count() - 1