comparison mercurial/hgweb/common.py @ 43447: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 c59eb1560c44
children 29adf0a087a1
comparison
equal deleted inserted replaced
43446:8accf5fa9930 43447:6ff1a0d109c9
191 """ 191 """
192 if not ispathsafe(fname): 192 if not ispathsafe(fname):
193 return 193 return
194 194
195 fpath = os.path.join(*fname.split(b'/')) 195 fpath = os.path.join(*fname.split(b'/'))
196 if isinstance(directory, str): 196 if isinstance(directory, bytes):
197 directory = [directory] 197 directory = [directory]
198 for d in directory: 198 for d in directory:
199 path = os.path.join(d, fpath) 199 path = os.path.join(d, fpath)
200 if os.path.exists(path): 200 if os.path.exists(path):
201 break 201 break