Mercurial > public > mercurial-scm > hg
comparison mercurial/ui.py @ 30925:82f1ef8b4477
py3: convert the mode argument of os.fdopen to unicodes (2 of 2)
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 13 Feb 2017 22:15:28 +0530 |
parents | 7080652af6e6 |
children | 120682fce099 |
comparison
equal
deleted
inserted
replaced
30924:48dea083f66d | 30925:82f1ef8b4477 |
---|---|
1036 rdir = repopath | 1036 rdir = repopath |
1037 (fd, name) = tempfile.mkstemp(prefix='hg-' + extra['prefix'] + '-', | 1037 (fd, name) = tempfile.mkstemp(prefix='hg-' + extra['prefix'] + '-', |
1038 suffix=extra['suffix'], text=True, | 1038 suffix=extra['suffix'], text=True, |
1039 dir=rdir) | 1039 dir=rdir) |
1040 try: | 1040 try: |
1041 f = os.fdopen(fd, "w") | 1041 f = os.fdopen(fd, pycompat.sysstr("w")) |
1042 f.write(text) | 1042 f.write(text) |
1043 f.close() | 1043 f.close() |
1044 | 1044 |
1045 environ = {'HGUSER': user} | 1045 environ = {'HGUSER': user} |
1046 if 'transplant_source' in extra: | 1046 if 'transplant_source' in extra: |