##// END OF EJS Templates
py3: properly reject non-encoded strings given to hgweb
Ludovic Chabant -
r42395:91104f10 default
parent child Browse files
Show More
@@ -38,6 +38,9 b' def hgweb(config, name=None, baseui=None'
38 - list of virtual:real tuples (multi-repo view)
38 - list of virtual:real tuples (multi-repo view)
39 '''
39 '''
40
40
41 if isinstance(config, pycompat.unicode):
42 raise error.ProgrammingError(
43 'Mercurial only supports encoded strings: %r' % config)
41 if ((isinstance(config, bytes) and not os.path.isdir(config)) or
44 if ((isinstance(config, bytes) and not os.path.isdir(config)) or
42 isinstance(config, dict) or isinstance(config, list)):
45 isinstance(config, dict) or isinstance(config, list)):
43 # create a multi-dir interface
46 # create a multi-dir interface
General Comments 0
You need to be logged in to leave comments. Login now