Logo Search packages:      
Sourcecode: sabayon version File versions  Download package

def lib::storage::ProfileStorage::copy (   self,
  name 
)

Create a new ProfileStorage object, copying the
contents of this profile to the new profile.

@name: the name of the new profile.

Return value: a #ProfileStorage object.

Definition at line 319 of file storage.py.

00319                          :
        """Create a new ProfileStorage object, copying the
        contents of this profile to the new profile.

        @name: the name of the new profile.

        Return value: a #ProfileStorage object.
        """
        if os.path.isfile (self.path) and zipfile.is_zipfile (self.path):
            new_path = os.path.join (PROFILESDIR, name + ".zip")
            try:
                shutil.copyfile (self.path, new_path)
            except:
                dprint ("Failed to copy profile from '%s' to '%s': %s",
                        self.path, new_path, sys.exc_info()[1])
        
        retval = ProfileStorage (name)
        retval.save ()
        return retval

    def add (self, path, src_dir, source, attributes = None, src_path = None):


Generated by  Doxygen 1.6.0   Back to index