Mercurial > hg
changeset 27160:c533435cbc37
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.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 28 Nov 2015 17:06:29 +0800 |
parents | 7e10b860c174 |
children | 296d55def9c4 |
files | mercurial/hgweb/webcommands.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Sat Nov 28 16:46:31 2015 +0800 +++ b/mercurial/hgweb/webcommands.py Sat Nov 28 17:06:29 2015 +0800 @@ -792,7 +792,7 @@ 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: