Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def delete_group(self, group):
def callback():
for contact in self.contacts:
contact._delete_group_ownership(group)
self.groups.discard(group)
self.emit('group-deleted', group)
dg = scenario.GroupDeleteScenario(self._ab,
(callback,),
(self.__common_errback,))
dg.group_guid = group.id
dg()
def delete_group(self, group, done_cb=None, failed_cb=None):
def callback():
self.__remove_group(group, done_cb)
dg = scenario.GroupDeleteScenario(self._ab,
(callback,),
(self.__common_errback, failed_cb))
dg.group_guid = group.id
dg()
def delete_group(self, group, done_cb=None, failed_cb=None):
def callback():
for contact in self.contacts:
contact._delete_group_ownership(group)
self.groups.discard(group)
self.__common_callback('group-deleted', done_cb, group)
dg = scenario.GroupDeleteScenario(self._ab,
(callback,),
(self.__common_errback, failed_cb))
dg.group_guid = group.id
dg()
def delete_group(self, group, done_cb=None, failed_cb=None):
def callback():
for contact in self.contacts:
contact._delete_group_ownership(group)
self.groups.discard(group)
self.__common_callback('group-deleted', done_cb, group)
dg = scenario.GroupDeleteScenario(self._ab,
(callback,),
(self.__common_errback, failed_cb))
dg.group_guid = group.id
dg()