# HG changeset patch # User Goffi # Date 1443201552 -7200 # Node ID fbe86b5d156f68a1c8ce50dfdfa4b6137a129a77 # Parent 8c071bc359c9967bfca7822853fd01b1f02b4572 core (memory, params): minor docstrings updates diff -r 8c071bc359c9 -r fbe86b5d156f src/memory/memory.py --- a/src/memory/memory.py Fri Sep 25 19:19:12 2015 +0200 +++ b/src/memory/memory.py Fri Sep 25 19:19:12 2015 +0200 @@ -356,9 +356,9 @@ def getProfileName(self, profile_key, return_profile_keys=False): """Return name of profile from keyword - @param profile_key: can be the profile name or a keywork (like @DEFAULT@) + @param profile_key: can be the profile name or a keyword (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 + @return: requested profile name @raise exceptions.ProfileUnknownError if profile doesn't exists """ return self.params.getProfileName(profile_key, return_profile_keys) diff -r 8c071bc359c9 -r fbe86b5d156f src/memory/params.py --- a/src/memory/params.py Fri Sep 25 19:19:12 2015 +0200 +++ b/src/memory/params.py Fri Sep 25 19:19:12 2015 +0200 @@ -190,9 +190,9 @@ """return profile according to profile_key @param profile_key: profile name or key which can be - @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 + C.PROF_KEY_ALL for all profiles + C.PROF_KEY_DEFAULT for default profile + @param return_profile_keys: if True, return unmanaged profile keys (like C.PROF_KEY_ALL). This keys must be managed by the caller @return: requested profile name @raise exceptions.ProfileUnknownError if profile doesn't exists """ @@ -208,7 +208,7 @@ return default # FIXME: temporary, must use real default value, and fallback to first one if it doesn't exists elif profile_key == C.PROF_KEY_NONE: raise exceptions.ProfileNotSetError - elif return_profile_keys and profile_key in ["@ALL@"]: + elif return_profile_keys and profile_key in [C.PROF_KEY_ALL]: 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)