diff hgext/keyword.py @ 38165: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 a0b17f744cbc
children 67dc32d4e790
line wrap: on
line diff
--- a/hgext/keyword.py	Sat May 26 12:14:04 2018 +0900
+++ b/hgext/keyword.py	Sat May 26 12:20:36 2018 +0900
@@ -87,7 +87,6 @@
 
 import os
 import re
-import tempfile
 import weakref
 
 from mercurial.i18n import _
@@ -434,7 +433,7 @@
             ui.write('%s = %s\n' % (k, v))
 
     fn = 'demo.txt'
-    tmpdir = tempfile.mkdtemp('', 'kwdemo.')
+    tmpdir = pycompat.mkdtemp('', 'kwdemo.')
     ui.note(_('creating temporary repository at %s\n') % tmpdir)
     if repo is None:
         baseui = ui