Add missing extra "greenthread" arg to remove_event()

See: http://eventlet.net/doc/modules/greenthread.html
the callback gets passed a "gt" arg.

Change-Id: I9bd44857662e45a1da2d4287017eb966dea8276d
Closes-bug: #1379072
This commit is contained in:
Angus Salkeld 2014-10-09 15:35:34 +10:00
parent 2d669b4f8b
commit c73d607246
2 changed files with 3 additions and 3 deletions

View File

@ -179,7 +179,7 @@ class ThreadGroupManager(object):
def add_event(self, stack_id, event):
self.events[stack_id].append(event)
def remove_event(self, stack_id, event):
def remove_event(self, gt, stack_id, event):
for e in self.events.pop(stack_id, []):
if e is not event:
self.add_event(stack_id, e)

View File

@ -3503,9 +3503,9 @@ class ThreadGroupManagerTest(HeatTestCase):
thm = service.ThreadGroupManager()
thm.add_event(stack_id, e1)
thm.add_event(stack_id, e2)
thm.remove_event(stack_id, e2)
thm.remove_event(None, stack_id, e2)
self.assertEqual(thm.events[stack_id], [e1])
thm.remove_event(stack_id, e1)
thm.remove_event(None, stack_id, e1)
self.assertNotIn(stack_id, thm.events)
def test_tgm_send(self):