(self, profile)
Delete a profile
Delete a profile
Delete a profile
def del_profile(self, profile):
        """Delete a profile"""
        if profile == self.profile:
            # FIXME: We should solve this problem by updating terminals when we
            # remove a profile
            err('Config::del_profile: Deleting in-use profile %s.' % profile)
            self.set_profile('default')
        if profile in self.base.profiles:
            del(self.base.profiles[profile])
        options = self.options_get()
        if options and options.profile == profile:
            options.profile = None
            self.options_set(options)
def del_profile ( self , profile ) : if profile == self . profile : # FIXME: We should solve this problem by updating terminals when we # remove a profile err ( 'Config::del_profile: Deleting in-use profile %s.' % profile ) self . set_profile ( 'default' ) if profile in self . base . profiles : del ( self . base . profiles [ profile ] ) options = self . options_get ( ) if options and options . profile == profile : options . profile = None self . options_set ( options )