D4731: py3: cast exception to bytes

Yuya Nishihara yuya at tcha.org
Tue Sep 25 08:58:49 EDT 2018


> @@ -319,7 +319,8 @@
>      except Exception as e:
>          action, meta = reactor.onservererror(
>              outstream, command['requestid'],
> -            _('exception when invoking command: %s') % e)
> +            _('exception when invoking command: %s') %
> +            pycompat.sysbytes(str(e)))

Nit: `stringutil.forcebytestr(e)` is better since it can handle platform
strings.


More information about the Mercurial-devel mailing list