comparison mercurial/debugcommands.py @ 31008:d194f0dba7ac

py3: convert the mode argument of os.fdopen to unicodes Couple of these from the earlier series got lost while rebasing. So this patch converts them again.
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 16 Feb 2017 17:30:35 +0530
parents bd5694ce8beb
children 0b8356705de6
comparison
equal deleted inserted replaced
31007:1ee685defe80 31008:d194f0dba7ac
908 Returns 0 on success. 908 Returns 0 on success.
909 ''' 909 '''
910 910
911 def writetemp(contents): 911 def writetemp(contents):
912 (fd, name) = tempfile.mkstemp(prefix="hg-debuginstall-") 912 (fd, name) = tempfile.mkstemp(prefix="hg-debuginstall-")
913 f = os.fdopen(fd, "wb") 913 f = os.fdopen(fd, pycompat.sysstr("wb"))
914 f.write(contents) 914 f.write(contents)
915 f.close() 915 f.close()
916 return name 916 return name
917 917
918 problems = 0 918 problems = 0