def set_current_profile_by_name( self, name ): """ Change the current profile. Args: name (str): valid profile name Returns: bool: True if successful """ profiles = self.get_profiles() for profile_id in profiles: if self.get_profile_name( profile_id ) == name: self.current_profile_id = profile_id logger.debug('change current profile: %s' %name, self) logger.changeProfile(profile_id) return True return False
def setCurrentProfileByName(self, name): """ Change the current profile. Args: name (str): valid profile name Returns: bool: ``True`` if successful """ profiles = self.profiles() for profile_id in profiles: if self.profileName(profile_id) == name: self.current_profile_id = profile_id logger.debug("change current profile: %s" % name, self) logger.changeProfile(profile_id) return True return False
def setCurrentProfileByName(self, name): """ Change the current profile. Args: name (str): valid profile name Returns: bool: ``True`` if successful """ profiles = self.profiles() for profile_id in profiles: if self.profileName(profile_id) == name: self.current_profile_id = profile_id logger.debug('change current profile: %s' %name, self) logger.changeProfile(profile_id) return True return False
def set_current_profile( self, profile_id ): """ Change the current profile. Args: profile_id (str, int): valid profile ID Returns: bool: True if successful """ if isinstance(profile_id, int): profile_id = str(profile_id) profiles = self.get_profiles() for i in profiles: if i == profile_id: self.current_profile_id = profile_id logger.debug('change current profile: %s' %profile_id, self) logger.changeProfile(profile_id) return True return False
def setCurrentProfile(self, profile_id): """ Change the current profile. Args: profile_id (str, int): valid profile ID Returns: bool: ``True`` if successful """ if isinstance(profile_id, int): profile_id = str(profile_id) profiles = self.profiles() for i in profiles: if i == profile_id: self.current_profile_id = profile_id logger.debug("change current profile: %s=%s" % (profile_id, self.profileName(profile_id)), self) logger.changeProfile(profile_id) return True return False
def set_current_profile( self, profile_id ): """ Change the current profile. Args: profile_id (str, int): valid profile ID Returns: bool: True if successful """ if isinstance(profile_id, int): profile_id = str(profile_id) profiles = self.get_profiles() for i in profiles: if i == profile_id: self.current_profile_id = profile_id logger.debug('change current profile: %s' %profile_id, self) logger.changeProfile(profile_id) return True return False