def cleanup(): # pylint: disable=unused-variable for group in list(gossip.get_groups()): if group.name == 'slash': continue group.undefine() for hook in gossip.get_all_hooks(): if hook.group.name != 'slash': hook.undefine() else: hook.unregister_all()
def cleanup(): for group in list(gossip.get_groups()): if group.name == 'slash': continue group.undefine() for hook in gossip.get_all_hooks(): if hook.group.name != 'slash': hook.undefine() else: hook.unregister_all()
def _get_all_registrations(include_empty=False): return [ registration for hook in gossip.get_all_hooks() for registration in hook.get_registrations(include_empty=include_empty) ]
def clear_registrations(): for hook in gossip.get_all_hooks(): hook.unregister_all()
def _get_all_registrations(include_empty=False): return [registration for hook in gossip.get_all_hooks() for registration in hook.get_registrations(include_empty=include_empty)]