Mercurial > libervia-backend
changeset 478:f856575a62a6
plugin groupblog: fixed initialisation
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 25 Jun 2012 01:00:55 +0200 |
parents | 031b0e0aaab8 |
children | 4b62ce15a5f8 |
files | src/plugins/plugin_misc_groupblog.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/plugin_misc_groupblog.py Mon Jun 25 00:08:16 2012 +0200 +++ b/src/plugins/plugin_misc_groupblog.py Mon Jun 25 01:00:55 2012 +0200 @@ -125,12 +125,19 @@ debug(_('Looking for item-access power pubsub server')) #we don't have any pubsub server featuring item access yet client.item_access_pubsub = None + client._item_access_pubsub_pending = defer.Deferred() for entity in self.host.memory.getServerServiceEntities("pubsub", "service", profile): _disco = yield client.disco.requestInfo(entity) #if set([NS_PUBSUB_ITEM_ACCESS, NS_PUBSUB_AUTO_CREATE, NS_PUBSUB_CREATOR_JID_CHECK]).issubset(_disco.features): if set([NS_PUBSUB_AUTO_CREATE, NS_PUBSUB_CREATOR_JID_CHECK]).issubset(_disco.features): info(_("item-access powered pubsub service found: [%s]") % entity.full()) client.item_access_pubsub = entity + client._item_access_pubsub_pending.callback(None) + + if hasattr(client,"_item_access_pubsub_pending"): + #XXX: we need to wait for item access pubsub service check + ignore = yield client._item_access_pubsub_pending + del client._item_access_pubsub_pending if not client.item_access_pubsub: error(_("No item-access powered pubsub server found, can't use group blog"))