diff mercurial/posix.py @ 32908: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
+++ b/mercurial/posix.py
@@ -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.