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

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

Create a ProfileStorage.

@name: the name of the profile - translates to
/etc/desktop-profiles/$(name).zip.

Definition at line 104 of file storage.py.

00104                              :
        """Create a ProfileStorage.

        @name: the name of the profile - translates to
        /etc/desktop-profiles/$(name).zip.
        """
        self.name = name
      self.readonly = 0
      
        if not os.path.isabs (self.name):
          try:
              protocol = urlparse.urlparse(self.name)[0]
              if protocol == "":
                self.path = os.path.join (PROFILESDIR, self.name + ".zip")
            else:
                # if someone uses file:/// they deserve to have troubles
                self.readonly == 1
                cachou = cache.get_default_cache()
                self.path = cachou.get_resource(self.name)
                if self.path == None:
                    self.path = self.name
                
          except:
            self.path = os.path.join (PROFILESDIR, self.name + ".zip")
        else:
            self.path = name
            
        self.metadata         = None
        self.zip              = None
        self.temp_path        = None
        self.needs_saving     = False

        dprint ("Creating profile '%s' from '%s'", self.name, self.path)

    def __del__ (self):


Generated by  Doxygen 1.6.0   Back to index