changeset 36376:dbadf28d4db0

py3: use pycompat.bytestr to convert str returned by getpass.getuser to bytes
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 23 Feb 2018 17:14:25 +0530
parents f798709eb4b9
children 39212037e65e
files hgext/acl.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/acl.py	Fri Feb 23 16:57:17 2018 +0530
+++ b/hgext/acl.py	Fri Feb 23 17:14:25 2018 +0530
@@ -200,6 +200,7 @@
     error,
     extensions,
     match,
+    pycompat,
     registrar,
     util,
 )
@@ -340,7 +341,7 @@
             user = urlreq.unquote(url[3])
 
     if user is None:
-        user = getpass.getuser()
+        user = pycompat.bytestr(getpass.getuser())
 
     ui.debug('acl: checking access for user "%s"\n' % user)