# HG changeset patch # User Anton Shestakov # Date 2015-11-28 09:06:29 # Node ID c533435cbc3716ef207fc6e1391f6804807c5b36 # Parent 7e10b860c17461b7e4e2633b445343c8d2892fe9 webcommands: test that fctx is not None in filediff() A block of code above this one already says "if fctx is not None", and it's also what this code actually intends to check, so let's be specific as PEP-8 recommends. diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -792,7 +792,7 @@ def filediff(web, req, tmpl): style = req.form['style'][0] diffs = webutil.diffs(web.repo, tmpl, ctx, None, [path], parity, style) - if fctx: + if fctx is not None: rename = webutil.renamelink(fctx) ctx = fctx else: