Mercurial > hg
diff hgext/convert/common.py @ 48934:06de08b36c82
py3: use str instead of pycompat.unicode
pycompat.unicode is an alias to str.
Differential Revision: https://phab.mercurial-scm.org/D12340
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 11:24:57 -0700 |
parents | f254fc73d956 |
children | fd5b8e696b75 |
line wrap: on
line diff
--- a/hgext/convert/common.py Tue Mar 08 10:58:22 2022 +0100 +++ b/hgext/convert/common.py Mon Feb 21 11:24:57 2022 -0700 @@ -246,7 +246,7 @@ if not encoding: encoding = self.encoding or b'utf-8' - if isinstance(s, pycompat.unicode): + if isinstance(s, str): return s.encode("utf-8") try: return s.decode(pycompat.sysstr(encoding)).encode("utf-8")