Mercurial > libervia-backend
diff src/core/sat_main.py @ 787:dd656d745d6a
test: added tests for XEP-0033
author | souliane <souliane@mailoo.org> |
---|---|
date | Sun, 05 Jan 2014 13:05:31 +0100 |
parents | 5642939d254e |
children | 02ee9ef95277 |
line wrap: on
line diff
--- a/src/core/sat_main.py Sun Jan 05 13:04:54 2014 +0100 +++ b/src/core/sat_main.py Sun Jan 05 13:05:31 2014 +0100 @@ -68,7 +68,9 @@ """ Exception to raise if the message has been already sent and stored in the history by the trigger, so the rest of the process should be stopped. This should normally be raised by the trigger with the minimal priority """ - pass + def __init__(self, reason, mess_data): + Exception(reason) + self.mess_data = mess_data # added for testing purpose class AbortSendMessage(Exception): @@ -652,10 +654,10 @@ def requestServerDisco(self, feature, jid_=None, cache_only=False, profile_key="@NONE"): """Discover if a server or its items offer a given feature @param feature: the feature to check - @param jid_: the jid of the server + @param jid_: the jid of the server, local server if None @param cache_only: expect the result to be in cache and don't actually - make any request to avoid returning a Deferred. This can be used anytime - for requesting the local server because the data are cached for sure. + make any request. This can be used anytime for requesting a feature on + the local server because the data are cached for sure. @result: the Deferred entity jid offering the feature, or None """ profile = self.memory.getProfileName(profile_key)