py3: make posix.getuser return a bytes
authorPulkit Goyal <7895pulkit@gmail.com>
Fri, 21 Apr 2017 00:53:38 +0530
changeset 32182 f0ea0f642627
parent 32181 c3342c177211
child 32183 c3dcec6cbc1b
py3: make posix.getuser return a bytes
mercurial/posix.py
--- a/mercurial/posix.py	Thu Apr 20 19:57:16 2017 +0530
+++ b/mercurial/posix.py	Fri Apr 21 00:53:38 2017 +0530
@@ -494,7 +494,7 @@
 
 def getuser():
     '''return name of current user'''
-    return getpass.getuser()
+    return pycompat.fsencode(getpass.getuser())
 
 def username(uid=None):
     """Return the name of the user with the given uid.