Read about our upcoming Code of Conduct on this issue

localrepo: fix conversion of exceptions to strings flagged by pytype

This is the same as e571fec5b606.  I assume the 3 similar uses of `bytestr` in
`__getitem__()` are OK (even though pytype also flags them), because there is
apparently test coverage for 2 of the 3 cases.

Differential Revision: https://phab.mercurial-scm.org/D10131

--HG--
branch : stable
13 jobs for 5.7.1 in 31 minutes and 44 seconds (queued for 5 seconds)
latest
Status Name Job ID Coverage
  Tests
passed checks-py2 #174211

00:05:15

passed checks-py3 #174212

00:05:49

passed rust-cargo-test-py2 #174213

00:03:20

passed rust-cargo-test-py3 #174214

00:02:21

passed test-py2 #174215

00:21:23

passed test-py2-chg #174221

00:23:39

passed test-py2-pure #174217

00:22:35

passed test-py2-rust #174219

00:26:19

passed test-py3 #174216

00:14:46

passed test-py3-chg #174222

00:11:53

passed test-py3-pure #174218

00:19:10

passed test-py3-rust #174220

00:24:56

 
  Phabricator
passed phabricator-refresh #174223

00:00:24