def _unregister_bundle_factories(self, bundle):
        # type: (Bundle) -> None
        """
        Unregisters all factories of the given bundle

        :param bundle: A bundle
        """
        with self.__factories_lock:
            # Find out which factories must be removed
            to_remove = [
                factory_name
                for factory_name in self.__factories
                if self.get_factory_bundle(factory_name) is bundle
            ]

            # Remove all of them
            for factory_name in to_remove:
                try:
                    self.unregister_factory(factory_name)
                except ValueError as ex:
                    _logger.warning(
                        "Error unregistering factory '%s': %s", factory_name, ex
                    )
def _unregister_bundle_factories ( self , bundle ) : with self . __factories_lock : to_remove = [ factory_name for factory_name in self . __factories if self . get_factory_bundle ( factory_name ) is bundle ] for factory_name in to_remove : try : self . unregister_factory ( factory_name ) except ValueError as ex : _logger . warning ( "Error unregistering factory '%s': %s" , factory_name , ex )
Unregisters all factories of the given bundle

        :param bundle: A bundle