Mercurial > hg
diff hgext/infinitepush/common.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 | 5a9692d0d6fc |
children | 090e5f3900b7 |
line wrap: on
line diff
--- a/hgext/infinitepush/common.py Thu May 03 18:39:58 2018 +0900 +++ b/hgext/infinitepush/common.py Sat May 26 12:14:04 2018 +0900 @@ -6,13 +6,13 @@ from __future__ import absolute_import import os -import tempfile from mercurial.node import hex from mercurial import ( error, extensions, + pycompat, ) def isremotebooksenabled(ui): @@ -30,7 +30,7 @@ def _makebundlefromraw(data): fp = None - fd, bundlefile = tempfile.mkstemp() + fd, bundlefile = pycompat.mkstemp() try: # guards bundlefile try: # guards fp fp = os.fdopen(fd, 'wb')