Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/hgwebdir_mod.py @ 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 | c2cb6be4212f |
children | d1fccbd50fcd |
comparison
equal
deleted
inserted
replaced
34701:6db536bed7ec | 34702:b2316265a32e |
---|---|
506 styles, (style, mapfile) = hgweb_mod.getstyle(req, config, | 506 styles, (style, mapfile) = hgweb_mod.getstyle(req, config, |
507 self.templatepath) | 507 self.templatepath) |
508 if style == styles[0]: | 508 if style == styles[0]: |
509 vars['style'] = style | 509 vars['style'] = style |
510 | 510 |
511 start = url[-1] == '?' and '&' or '?' | 511 start = '&' if url[-1] == '?' else '?' |
512 sessionvars = webutil.sessionvars(vars, start) | 512 sessionvars = webutil.sessionvars(vars, start) |
513 logourl = config('web', 'logourl') | 513 logourl = config('web', 'logourl') |
514 logoimg = config('web', 'logoimg') | 514 logoimg = config('web', 'logoimg') |
515 staticurl = config('web', 'staticurl') or url + 'static/' | 515 staticurl = config('web', 'staticurl') or url + 'static/' |
516 if not staticurl.endswith('/'): | 516 if not staticurl.endswith('/'): |