comparison 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
comparison
equal deleted inserted replaced
32128:c3342c177211 32129:f0ea0f642627
492 st = None 492 st = None
493 yield st 493 yield st
494 494
495 def getuser(): 495 def getuser():
496 '''return name of current user''' 496 '''return name of current user'''
497 return getpass.getuser() 497 return pycompat.fsencode(getpass.getuser())
498 498
499 def username(uid=None): 499 def username(uid=None):
500 """Return the name of the user with the given uid. 500 """Return the name of the user with the given uid.
501 501
502 If uid is None, return the name of the current user.""" 502 If uid is None, return the name of the current user."""