Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireprotov1server.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 | b4d85bc122bd |
children | 7e4a856a4f05 |
line wrap: on
line diff
--- a/mercurial/wireprotov1server.py Thu May 03 18:39:58 2018 +0900 +++ b/mercurial/wireprotov1server.py Sat May 26 12:14:04 2018 +0900 @@ -8,7 +8,6 @@ from __future__ import absolute_import import os -import tempfile from .i18n import _ from .node import ( @@ -568,7 +567,7 @@ fp.close() if tempname: os.unlink(tempname) - fd, tempname = tempfile.mkstemp(prefix='hg-unbundle-') + fd, tempname = pycompat.mkstemp(prefix='hg-unbundle-') repo.ui.debug('redirecting incoming bundle to %s\n' % tempname) fp = os.fdopen(fd, pycompat.sysstr('wb+'))