(self, profile, force=False)
Set our profile (which usually means change it)
Set our profile (which usually means change it)
Set our profile ( which usually means change it )
def set_profile(self, profile, force=False):
        """Set our profile (which usually means change it)"""
        options = self.options_get()
        if not force and options and options.profile and profile == 'default':
            dbg('overriding default profile to %s' % options.profile)
            profile = options.profile
        dbg('Config::set_profile: Changing profile to %s' % profile)
        self.profile = profile
        if profile not in self.base.profiles:
            dbg('Config::set_profile: %s does not exist, creating' % profile)
            self.base.profiles[profile] = copy(DEFAULTS['profiles']['default'])
def set_profile ( self , profile , force = False ) : options = self . options_get ( ) if not force and options and options . profile and profile == 'default' : dbg ( 'overriding default profile to %s' % options . profile ) profile = options . profile dbg ( 'Config::set_profile: Changing profile to %s' % profile ) self . profile = profile if profile not in self . base . profiles : dbg ( 'Config::set_profile: %s does not exist, creating' % profile ) self . base . profiles [ profile ] = copy ( DEFAULTS [ 'profiles' ] [ 'default' ] )