Mercurial > hg
changeset 34702:b2316265a32e
hgweb: rewrite two X or Y and Z ad-hoc ternaries with Y if X else Z
Just easier to muddle through for my brain now that I don't see the
old pattern much anymore.
Differential Revision: https://phab.mercurial-scm.org/D1077
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 05 Oct 2017 14:48:31 -0400 |
parents | 6db536bed7ec |
children | d1fccbd50fcd |
files | mercurial/hgweb/hgweb_mod.py mercurial/hgweb/hgwebdir_mod.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Sun Oct 01 12:12:34 2017 -0400 +++ b/mercurial/hgweb/hgweb_mod.py Thu Oct 05 14:48:31 2017 -0400 @@ -187,7 +187,7 @@ if style == styles[0]: vars['style'] = style - start = req.url[-1] == '?' and '&' or '?' + start = '&' if req.url[-1] == '?' else '?' sessionvars = webutil.sessionvars(vars, start) if not self.reponame:
--- a/mercurial/hgweb/hgwebdir_mod.py Sun Oct 01 12:12:34 2017 -0400 +++ b/mercurial/hgweb/hgwebdir_mod.py Thu Oct 05 14:48:31 2017 -0400 @@ -508,7 +508,7 @@ if style == styles[0]: vars['style'] = style - start = url[-1] == '?' and '&' or '?' + start = '&' if url[-1] == '?' else '?' sessionvars = webutil.sessionvars(vars, start) logourl = config('web', 'logourl') logoimg = config('web', 'logoimg')