Mercurial > public > mercurial-scm > hg-stable
diff hgext/patchbomb.py @ 38198:2ce60954b1b7
py3: wrap tempfile.mkdtemp() to use bytes path
This also flips the default to use a bytes path on Python 3.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 26 May 2018 12:20:36 +0900 |
parents | 46c2b19a1263 |
children | 457fa4056286 |
line wrap: on
line diff
--- a/hgext/patchbomb.py Sat May 26 12:14:04 2018 +0900 +++ b/hgext/patchbomb.py Sat May 26 12:20:36 2018 +0900 @@ -79,7 +79,6 @@ import errno import os import socket -import tempfile from mercurial.i18n import _ from mercurial import ( @@ -317,7 +316,7 @@ The bundle is a returned as a single in-memory binary blob. """ ui = repo.ui - tmpdir = tempfile.mkdtemp(prefix='hg-email-bundle-') + tmpdir = pycompat.mkdtemp(prefix='hg-email-bundle-') tmpfn = os.path.join(tmpdir, 'bundle') btype = ui.config('patchbomb', 'bundletype') if btype: