(self, profile, toclone)
return(True)
Add a new profile
Add a new profile
Add a new profile
def add_profile(self, profile, toclone):
        """Add a new profile"""
        if profile in self.profiles:
            return(False)
        if toclone is not None:
            newprofile = copy(toclone)
        else:
            newprofile = copy(DEFAULTS['profiles']['default'])
        self.profiles[profile] = newprofile
        return(True)
def add_profile ( self , profile , toclone ) : if profile in self . profiles : return ( False ) if toclone is not None : newprofile = copy ( toclone ) else : newprofile = copy ( DEFAULTS [ 'profiles' ] [ 'default' ] ) self . profiles [ profile ] = newprofile return ( True )