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

def lib::cache::cacheRepository::__catalog_lookup (   self,
  URL 
) [private]

lookup an entry in the catalog, it will return a tuple of the
 file path and the timestamp if found, None otherwise. If the
 file is referenced in the cache but has not timestamp then it
 will return an empty string.

Definition at line 188 of file cache.py.

00188                                    :
        """lookup an entry in the catalog, it will return a tuple of the
         file path and the timestamp if found, None otherwise. If the
         file is referenced in the cache but has not timestamp then it
         will return an empty string."""
      if self.root == None:
          return None
      try:
          child = self.root.xpathEval("/catalog/entry[@URL = '%s']" % URL)[0]
      except:
          return None
      filename = self.directory + "/" + self.__URL_mapping(URL)
      try:
          info = os.stat(filename)
      except:
          dprint("Local cache file for %s disapeared", URL)
          child.unlinkNode()
          child.freeNode()
          return None
      return child.prop("timestamp")

    def get_resource(self, URL):


Generated by  Doxygen 1.6.0   Back to index