changeset 46570:7a29d9002250 stable

pycompat: fix a bytes vs str issue in `unnamedtempfile()` This seems trivially correct, though the only two uses I found both took this path. So I'm guessing we're missing test coverage. Differential Revision: https://phab.mercurial-scm.org/D10129
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 08 Mar 2021 12:28:53 -0500
parents a9887f9e87aa
children 25392c48da8a
files mercurial/pycompat.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/pycompat.py	Fri Feb 26 15:34:22 2021 +0530
+++ b/mercurial/pycompat.py	Mon Mar 08 12:28:53 2021 -0500
@@ -510,7 +510,7 @@
 # This wrapper file are always open in byte mode.
 def unnamedtempfile(mode=None, *args, **kwargs):
     if mode is None:
-        mode = b'w+b'
+        mode = 'w+b'
     else:
         mode = sysstr(mode)
     assert 'b' in mode