changeset 46701:c6d9948e865f stable

crecord: convert an instance of bytes to str Caught by pytype: File "/mnt/c/Users/Matt/hg/mercurial/crecord.py", line 1154, in printstring: Function _CursesWindow.addstr was called with the wrong arguments [wrong-arg-types] Expected: (self, str: str, ...) Actually passed: (self, str: bytes, ...) Differential Revision: https://phab.mercurial-scm.org/D10203
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 12 Mar 2021 18:55:06 -0500
parents 279edaaea711
children 56483ab91e66
files mercurial/crecord.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/crecord.py	Fri Mar 12 18:51:22 2021 -0500
+++ b/mercurial/crecord.py	Fri Mar 12 18:55:06 2021 -0500
@@ -1152,7 +1152,7 @@
             numtrailingspaces = origlen - strippedlen
 
         if towin:
-            window.addstr(text, colorpair)
+            window.addstr(encoding.strfromlocal(text), colorpair)
         t += text
 
         if showwhtspc: