def remListGroup(self, groupID):
"""
Used to remove a list group.
A default callback is added to the
returned Deferred which updates the
contacts attribute of the factory.
@param groupID: the ID of the desired group to be removed.
@return: A Deferred, the callback for which will be called when
the server clarifies the deletion of the group.
The callback argument will be a tuple with 2 elements:
the new list version (int) and the group ID (int) of
the removed group.
"""
id, d = self._createIDMapping()
self.sendLine("RMG %s %s" % (id, groupID))
def _cb(r):
self.factory.contacts.version = r[0]
self.factory.contacts.remGroup(r[1])
return r
return d.addCallback(_cb)
评论列表
文章目录