diff mercurial/server.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 d2bd29dffc6c
children e7aa113b14f7
line wrap: on
line diff
--- a/mercurial/server.py	Thu May 03 18:39:58 2018 +0900
+++ b/mercurial/server.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 _
 
@@ -72,7 +71,7 @@
 
     if opts['daemon'] and not opts['daemon_postexec']:
         # Signal child process startup with file removal
-        lockfd, lockpath = tempfile.mkstemp(prefix='hg-service-')
+        lockfd, lockpath = pycompat.mkstemp(prefix='hg-service-')
         os.close(lockfd)
         try:
             if not runargs: