From f0abdf51220daa53b07c3ef74cae11dbc413465b Mon Sep 17 00:00:00 2001 From: Joe Guo Date: Wed, 20 Jun 2018 16:34:44 +1200 Subject: [PATCH] emulate/traffic: fix next usage In commit b0c9de820c07d77c03b80505cb811ac1dac0808f, line 343: self.next_conversation_id = itertools.count().next was changed to: self.next_conversation_id = next(itertools.count()) which is not correct, the first one is a function, the second one is a int. This patch fixed it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13573 Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall (cherry picked from commit 8084f1838cee774fc79a4c7ff2d1182388105fcb) --- python/samba/emulate/traffic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/samba/emulate/traffic.py b/python/samba/emulate/traffic.py index dba2c3f32f9..8af67b95574 100644 --- a/python/samba/emulate/traffic.py +++ b/python/samba/emulate/traffic.py @@ -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 = next(itertools.count()) + self.next_conversation_id = itertools.count() def generate_ldap_search_tables(self): session = system_session() @@ -882,7 +882,7 @@ class Conversation(object): gap = t - now print("gap is now %f" % gap, file=sys.stderr) - self.conversation_id = context.next_conversation_id() + self.conversation_id = next(context.next_conversation_id) pid = os.fork() if pid != 0: return pid -- 2.11.0