Read about our upcoming Code of Conduct on this issue

Commit 484c2d90 authored by Matt Harbison's avatar Matt Harbison
Browse files

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:

branch : stable
parent 25392c48da8a
Pipeline #19038 passed with stages
in 31 minutes and 44 seconds
......@@ -540,7 +540,7 @@ def makelocalrepository(baseui, path, intents=None):
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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment