##// END OF EJS Templates
py3: don't use os.getcwdb() on Windows to avoid DeprecationWarnings...
Matt Harbison -
r39844:fb628c04 default
parent child Browse files
Show More
@@ -236,7 +236,12 b' if not _nativeenviron:'
236 if pycompat.ispy3:
236 if pycompat.ispy3:
237 # os.getcwd() on Python 3 returns string, but it has os.getcwdb() which
237 # os.getcwd() on Python 3 returns string, but it has os.getcwdb() which
238 # returns bytes.
238 # returns bytes.
239 getcwd = os.getcwdb # re-exports
239 if pycompat.iswindows:
240 # Python 3 on Windows issues a DeprecationWarning about using the bytes
241 # API when os.getcwdb() is called.
242 getcwd = lambda: strtolocal(os.getcwd()) # re-exports
243 else:
244 getcwd = os.getcwdb # re-exports
240 else:
245 else:
241 getcwd = os.getcwd # re-exports
246 getcwd = os.getcwd # re-exports
242
247
General Comments 0
You need to be logged in to leave comments. Login now