python/samba/emulate: py2/py3 .next usage, replace with next() fn
authorNoel Power <noel.power@suse.com>
Mon, 28 May 2018 16:01:57 +0000 (17:01 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 19 Jun 2018 22:18:22 +0000 (00:18 +0200)
python/samba/emulate/traffic.py

index db0fcf7788bd542a69406013f222491dafba4eca..dba2c3f32f9a9768926268dfe63a2f4c11bf82be 100644 (file)
@@ -340,7 +340,7 @@ class ReplayContext(object):
         self.last_netlogon_bad        = False
         self.last_samlogon_bad        = False
         self.generate_ldap_search_tables()
-        self.next_conversation_id = itertools.count().next
+        self.next_conversation_id = next(itertools.count())
 
     def generate_ldap_search_tables(self):
         session = system_session()
@@ -375,7 +375,7 @@ class ReplayContext(object):
         # for k, v in self.dn_map.items():
         #     print >>sys.stderr, k, len(v)
 
-        for k, v in dn_map.items():
+        for k in list(dn_map.keys()):
             if k[-3:] != ',DC':
                 continue
             p = k[:-3]