Mercurial > public > mercurial-scm > hg
diff mercurial/debugcommands.py @ 38164:aac4be30e250
py3: wrap tempfile.mkstemp() to use bytes path
This patch just flips the default to use a bytes path on Python 3.
ca1cf9b3cce7 is backed out as the bundlepath should be bytes now.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 26 May 2018 12:14:04 +0900 |
parents | b17fa9041695 |
children | cc9aa88792fe |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Thu May 03 18:39:58 2018 +0900 +++ b/mercurial/debugcommands.py Sat May 26 12:14:04 2018 +0900 @@ -1142,7 +1142,7 @@ opts = pycompat.byteskwargs(opts) def writetemp(contents): - (fd, name) = tempfile.mkstemp(prefix="hg-debuginstall-") + (fd, name) = pycompat.mkstemp(prefix="hg-debuginstall-") f = os.fdopen(fd, r"wb") f.write(contents) f.close()