changeset 46572:d5d9177c0045 stable 5.7.1

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
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 08 Mar 2021 16:55:39 -0500
parents 25392c48da8a
children d77513c0c26e
files mercurial/localrepo.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Mar 08 16:54:33 2021 -0500
+++ b/mercurial/localrepo.py	Mon Mar 08 16:55:39 2021 -0500
@@ -540,7 +540,7 @@
         except ValueError as e:
             # Can be raised on Python 3.8 when path is invalid.
             raise error.Abort(
-                _(b'invalid path %s: %s') % (path, pycompat.bytestr(e))
+                _(b'invalid path %s: %s') % (path, stringutil.forcebytestr(e))
             )
 
         raise error.RepoError(_(b'repository %s not found') % path)