comparison src/memory/memory.py @ 1595:a3d0cfa5b7a6

core, bridge: added a profileSetDefault method
author Goffi <goffi@goffi.org>
date Sat, 14 Nov 2015 19:18:10 +0100
parents 0df9c6247474
children fd7f41d8cbdf
comparison
equal deleted inserted replaced
1594:313f2bb7841b 1595:a3d0cfa5b7a6
431 @return: requested profile name 431 @return: requested profile name
432 @raise exceptions.ProfileUnknownError if profile doesn't exists 432 @raise exceptions.ProfileUnknownError if profile doesn't exists
433 """ 433 """
434 return self.params.getProfileName(profile_key, return_profile_keys) 434 return self.params.getProfileName(profile_key, return_profile_keys)
435 435
436 def profileSetDefault(self, profile):
437 """Set default profile
438
439 @param profile: %(doc_profile)s
440 """
441 # we want to be sure that the profile exists
442 profile = self.getProfileName(profile)
443
444 self.memory_data['Profile_default'] = profile
445
436 def asyncCreateProfile(self, name, password=''): 446 def asyncCreateProfile(self, name, password=''):
437 """Create a new profile 447 """Create a new profile
438 @param name: profile name 448 @param name: profile name
439 @param password: profile password 449 @param password: profile password
440 @return: Deferred 450 @return: Deferred