mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
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
This commit is contained in:
parent
14c0f38685
commit
4fec03fc61
@ -187,7 +187,7 @@ class requestcontext(object):
|
||||
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:
|
||||
|
@ -508,7 +508,7 @@ class hgwebdir(object):
|
||||
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')
|
||||
|
Loading…
Reference in New Issue
Block a user