krb5 commit: More python3 fixes for t_daemon.py

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/e0084425df784952e76b3bcc8ae9d08300234733
commit e0084425df784952e76b3bcc8ae9d08300234733
Author: Sumit Bose <[email protected]>
Date:   Mon Nov 8 17:47:17 2021 +0100

    More python3 fixes for t_daemon.py
    
    [[email protected]: use a list comprehension instead of map()]

 src/lib/krad/t_daemon.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/krad/t_daemon.py b/src/lib/krad/t_daemon.py
index 7668cd7..4a3de07 100755
--- a/src/lib/krad/t_daemon.py
+++ b/src/lib/krad/t_daemon.py
@@ -50,7 +50,7 @@ class TestServer(server.Server):
 
         for key in pkt.keys():
             if key == "User-Password":
-                passwd = map(pkt.PwDecrypt, pkt[key])
+                passwd = [pkt.PwDecrypt(x) for x in pkt[key]]
 
         reply = self.CreateReplyPacket(pkt)
         if passwd == ['accept']:
@@ -61,8 +61,8 @@ class TestServer(server.Server):
 
 srv = TestServer(addresses=["localhost"],
                  hosts={"127.0.0.1":
-                        server.RemoteHost("127.0.0.1", "foo", "localhost")},
-                 dict=dictionary.Dictionary(StringIO.StringIO(DICTIONARY)))
+                        server.RemoteHost("127.0.0.1", b"foo", "localhost")},
+                 dict=dictionary.Dictionary(StringIO(DICTIONARY)))
 
 # Write a sentinel character to let the parent process know we're listening.
 sys.stdout.write("~")
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.