D4967: py3: pass str and return bytes from mimetypes.guess_type()

Yuya Nishihara yuya at tcha.org
Fri Oct 12 11:06:12 EDT 2018


> +        mt = pycompat.sysbytes(
> +            mimetypes.guess_type(pycompat.fsdecode(f))[0]
> +            or 'application/octet-stream')

The default value has to be either `r''` prefixed or moved out of the
`sysbytes()`.


More information about the Mercurial-devel mailing list