diff --git a/src/memory/params.py b/src/memory/params.py index bd21e035..52995a95 100644 --- a/src/memory/params.py +++ b/src/memory/params.py @@ -194,7 +194,8 @@ class Params(object): 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 + @raise exceptions.ProfileUnknownError: profile doesn't exists + @raise exceptions.ProfileNotSetError: if C.PROF_KEY_NONE is used """ if profile_key == '@DEFAULT@': default = self.host.memory.memory_data.get('Profile_default') @@ -204,7 +205,7 @@ class Params(object): default = self.host.memory.memory_data['Profile_default'] = self.storage.getProfilesList()[0] except IndexError: log.info(_('No profile exist yet')) - return "" + raise exceptions.ProfileUnknownError 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