comparison mercurial/hgweb/webcommands.py @ 43742:6ff1a0d109c9 stable

hgweb: fix a few `str` type conditional for py3 Differential Revision: https://phab.mercurial-scm.org/D7534
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 30 Nov 2019 02:53:39 -0500
parents 8ff1ecfadcd1
children 3e4294aa7944
comparison
equal deleted inserted replaced
43741:8accf5fa9930 43742:6ff1a0d109c9
1319 # a repo owner may set web.static in .hg/hgrc to get any file 1319 # a repo owner may set web.static in .hg/hgrc to get any file
1320 # readable by the user running the CGI script 1320 # readable by the user running the CGI script
1321 static = web.config(b"web", b"static", untrusted=False) 1321 static = web.config(b"web", b"static", untrusted=False)
1322 if not static: 1322 if not static:
1323 tp = web.templatepath or templater.templatepaths() 1323 tp = web.templatepath or templater.templatepaths()
1324 if isinstance(tp, str): 1324 if isinstance(tp, bytes):
1325 tp = [tp] 1325 tp = [tp]
1326 static = [os.path.join(p, b'static') for p in tp] 1326 static = [os.path.join(p, b'static') for p in tp]
1327 1327
1328 staticfile(static, fname, web.res) 1328 staticfile(static, fname, web.res)
1329 return web.res.sendresponse() 1329 return web.res.sendresponse()