diff mercurial/posix.py @ 32129:f0ea0f642627

py3: make posix.getuser return a bytes
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 21 Apr 2017 00:53:38 +0530
parents 52361c4f4dac
children bd872f64a8ba
line wrap: on
line diff
--- 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.