Mercurial > public > mercurial-scm > hg-stable
diff mercurial/httppeer.py @ 38197: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 | 6169d95dce3b |
children | ead71b15efd5 |
line wrap: on
line diff
--- a/mercurial/httppeer.py Thu May 03 18:39:58 2018 +0900 +++ b/mercurial/httppeer.py Sat May 26 12:14:04 2018 +0900 @@ -13,7 +13,6 @@ import os import socket import struct -import tempfile import weakref from .i18n import _ @@ -519,7 +518,7 @@ filename = None try: # dump bundle to disk - fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg") + fd, filename = pycompat.mkstemp(prefix="hg-bundle-", suffix=".hg") fh = os.fdopen(fd, r"wb") d = fp.read(4096) while d: