# HG changeset patch # User Goffi # Date 1439678518 -7200 # Node ID c7fd121a61804fa348ace438890aa5ac62f1b365 # Parent 4c4f88d7b1564f08dd682afabaf99837c7b23c70 core: getProfileName no raise ProfileUnknownError + minor doc fixes diff -r 4c4f88d7b156 -r c7fd121a6180 src/memory/disco.py --- a/src/memory/disco.py Sun Aug 16 00:39:44 2015 +0200 +++ b/src/memory/disco.py Sun Aug 16 00:41:58 2015 +0200 @@ -154,7 +154,8 @@ @param type_: identitiy's type @param jid_: the jid of the target server (None for profile's server) @param profile_key: %(doc_profile_key)s - @return: a set of entities or None if no cached data were found + @return: a set of found entities + @raise CancelError: the request timed out """ found_entities = set() diff -r 4c4f88d7b156 -r c7fd121a6180 src/memory/memory.py --- a/src/memory/memory.py Sun Aug 16 00:39:44 2015 +0200 +++ b/src/memory/memory.py Sun Aug 16 00:41:58 2015 +0200 @@ -361,6 +361,7 @@ @param profile_key: can be the profile name or a keywork (like @DEFAULT@) @param return_profile_keys: if True, return unmanaged profile keys (like "@ALL@"). This keys must be managed by the caller @return: requested profile name or emptry string if it doesn't exist + @raise exceptions.ProfileUnknownError if profile doesn't exists """ return self.params.getProfileName(profile_key, return_profile_keys) diff -r 4c4f88d7b156 -r c7fd121a6180 src/memory/params.py --- a/src/memory/params.py Sun Aug 16 00:39:44 2015 +0200 +++ b/src/memory/params.py Sun Aug 16 00:41:58 2015 +0200 @@ -186,7 +186,9 @@ @ALL@ for all profiles @DEFAULT@ for default profile @param return_profile_keys: if True, return unmanaged profile keys (like "@ALL@"). This keys must be managed by the caller - @return: requested profile name or emptry string if it doesn't exist""" + @return: requested profile name + @raise exceptions.ProfileUnknownError if profile doesn't exists + """ if profile_key == '@DEFAULT@': default = self.host.memory.memory_data.get('Profile_default') if not default: @@ -203,7 +205,7 @@ return profile_key # this value must be managed by the caller if not self.storage.hasProfile(profile_key): log.error(_(u'Trying to access an unknown profile (%s)') % profile_key) - return "" # FIXME: raise exceptions.ProfileUnknownError here (must be well checked, this method is used in lot of places) + raise exceptions.ProfileUnknownError return profile_key def __get_unique_node(self, parent, tag, name): diff -r 4c4f88d7b156 -r c7fd121a6180 src/plugins/__init__.py --- a/src/plugins/__init__.py Sun Aug 16 00:39:44 2015 +0200 +++ b/src/plugins/__init__.py Sun Aug 16 00:41:58 2015 +0200 @@ -1,4 +1,5 @@ -# TODO: remove this when RSM and MAM are in wokkel +# FIXME: remove this when RSM and MAM are in wokkel +# XXX: the Monkey Patch is here and not in src/__init__ to avoir issues with pyjamas compilation import wokkel from sat.tmp.wokkel import delay as tmp_delay, pubsub as tmp_pubsub, rsm as tmp_rsm, mam as tmp_mam wokkel.delay = tmp_delay