D3706: py3: make sure util.username() always returns bytes

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sat Jun 9 22:18:37 EDT 2018


yuja added a comment.


  > @@ -541,9 +541,9 @@
  > 
  >   if uid is None:
  >       uid = os.getuid()
  >   try:
  > 
  > - return pwd.getpwuid(uid)[0] +        return pycompat.fsencode(pwd.getpwuid(uid)[0]) except KeyError:
  > - return str(uid) +        return pycompat.bytestr(uid)
  
  Nit: could be `b'%d' %`.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3706

To: pulkit, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list