lists.arthurdejong.org
RSS feed

nss-pam-ldapd branch master updated. 0.9.11-1-g1025d5d

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd branch master updated. 0.9.11-1-g1025d5d



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nss-pam-ldapd".

The branch, master has been updated
       via  1025d5de336d8c9585b79df3154b5649da344281 (commit)
      from  c4daf27eb3ec68bb9ec2a2779ed085f30e9d9b8e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://arthurdejong.org/git/nss-pam-ldapd/commit/?id=1025d5de336d8c9585b79df3154b5649da344281

commit 1025d5de336d8c9585b79df3154b5649da344281
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sun Oct 13 17:23:20 2019 +0200

    Fix Python 3 compatibility in chsh.ldap

diff --git a/utils/chsh.py b/utils/chsh.py
index e7537e7..0f24bfc 100755
--- a/utils/chsh.py
+++ b/utils/chsh.py
@@ -43,11 +43,11 @@ parser.add_argument('username', metavar='USER', nargs='?',
 def ask_shell(oldshell):
     """Ask the user to provide a shell."""
     # Provide Python 2 compatibility
+    prompt = '  Login Shell [%s]: ' % oldshell
     try:
-        input = raw_input
+        shell = raw_input(prompt)
     except NameError:
-        pass
-    shell = input('  Login Shell [%s]: ' % oldshell)
+        shell = input(prompt)
     return shell or oldshell
 
 
diff --git a/utils/shells.py b/utils/shells.py
index 92dba2f..327b35e 100644
--- a/utils/shells.py
+++ b/utils/shells.py
@@ -35,7 +35,7 @@ def list_shells():
         shell = getusershell()
         if not shell:
             break
-        yield shell
+        yield shell.decode('utf-8')
     libc.endusershell()
 
 

-----------------------------------------------------------------------

Summary of changes:
 utils/chsh.py   | 6 +++---
 utils/shells.py | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
nss-pam-ldapd