##// END OF EJS Templates
py3: add os.getcwdb() to have bytes path...
Pulkit Goyal -
r30500:fc0cfe6c default
parent child Browse files
Show More
@@ -667,7 +667,7 b' def _getlocal(ui, rpath, wd=None):'
667 667 """
668 668 if wd is None:
669 669 try:
670 wd = os.getcwd()
670 wd = pycompat.getcwd()
671 671 except OSError as e:
672 672 raise error.Abort(_("error getting current working directory: %s") %
673 673 e.strerror)
@@ -43,6 +43,9 b' if ispy3:'
43 43 osname = os.name.encode('ascii')
44 44 ospathsep = os.pathsep.encode('ascii')
45 45 ossep = os.sep.encode('ascii')
46 # os.getcwd() on Python 3 returns string, but it has os.getcwdb() which
47 # returns bytes.
48 getcwd = os.getcwdb
46 49
47 50 # TODO: .buffer might not exist if std streams were replaced; we'll need
48 51 # a silly wrapper to make a bytes stream backed by a unicode one.
@@ -110,6 +113,7 b' else:'
110 113 stdout = sys.stdout
111 114 stderr = sys.stderr
112 115 sysargv = sys.argv
116 getcwd = os.getcwd
113 117
114 118 stringio = io.StringIO
115 119 empty = _queue.Empty
General Comments 0
You need to be logged in to leave comments. Login now