changeset 1519:fbe86b5d156f

core (memory, params): minor docstrings updates
author Goffi <goffi@goffi.org>
date Fri, 25 Sep 2015 19:19:12 +0200
parents 8c071bc359c9
children 9667103a0c10
files src/memory/memory.py src/memory/params.py
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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)