Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def block_contact(self, contact):
def callback(memberships):
contact._set_memberships(memberships)
self.emit('contact-blocked', contact)
bc = scenario.BlockContactScenario(self._sharing,
(callback,),
(self.__common_errback,))
bc.account = contact.account
bc.network = contact.network_id
bc.membership = contact.memberships
bc()
def block_contact(self, contact, done_cb=None, failed_cb=None):
def callback(memberships):
contact._set_memberships(memberships)
self.__common_callback('contact-blocked', done_cb, contact)
bc = scenario.BlockContactScenario(self._sharing,
(callback,),
(self.__common_errback, failed_cb))
bc.account = contact.account
bc.network = contact.network_id
bc.membership = contact.memberships
bc()
def block_contact(self, contact, done_cb=None, failed_cb=None):
def callback(memberships):
contact._set_memberships(memberships)
self.__common_callback('contact-blocked', done_cb, contact)
bc = scenario.BlockContactScenario(self._sharing,
(callback,),
(self.__common_errback, failed_cb))
bc.account = contact.account
bc.network = contact.network_id
bc.membership = contact.memberships
bc()
def block_contact(self, contact, done_cb=None, failed_cb=None):
def callback(memberships):
contact._set_memberships(memberships)
self.__common_callback('contact-blocked', done_cb, contact)
bc = scenario.BlockContactScenario(self._sharing,
(callback,),
(self.__common_errback, failed_cb))
bc.account = contact.account
bc.network = contact.network_id
bc.membership = contact.memberships
bc()