diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -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: diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -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')