Remove trailing whitespaces.

This commit is contained in:
Emmanuel Gil Peyrot 2013-01-18 17:55:34 +01:00
commit 27b3592e16

View file

@ -157,7 +157,7 @@ class XEP_0277():
assert(callback)
d = self.host.plugins["XEP-0060"].getItems(jid.JID(pub_jid), NS_MICROBLOG, max_items=max_items, profile_key=profile_key)
d.addCallback(lambda items: map(self.item2mbdata, items))
def setMicroblogAccess(self, access="presence", profile_key='@DEFAULT@'):
"""Create a microblog node on PEP with given access
If the node already exists, it change options
@ -169,7 +169,7 @@ class XEP_0277():
error(_("Can't find profile's jid"))
return
_options = {OPT_ACCESS_MODEL:access, OPT_PERSIST_ITEMS:1, OPT_MAX_ITEMS:-1, OPT_DELIVER_PAYLOADS:1, OPT_SEND_ITEM_SUBSCRIBE: 1}
def cb(result):
#Node is created with right permission
debug(_("Microblog node has now access %s") % access)
@ -188,14 +188,14 @@ class XEP_0277():
change_node_options().addCallback(cb).addErrback(fatal_err)
else:
fatal_err(s_error)
def create_node():
return self.host.plugins["XEP-0060"].createNode(_jid.userhostJID(), NS_MICROBLOG, _options, profile_key=profile_key)
def change_node_options():
return self.host.plugins["XEP-0060"].setOptions(_jid.userhostJID(), NS_MICROBLOG, _jid.userhostJID(), _options, profile_key=profile_key)
create_node().addCallback(cb).addErrback(err_cb)