Exemplo n.º 1
0
 def fetch(self, fetcher, progress):
     if not os.path.isdir(self._path):
         raise Error, _("Channel '%s' has invalid directory: %s") % \
                      (self, self._path)
     digest = os.path.getmtime(self._path)
     if digest == self._digest:
         return True
     self.removeLoaders()
     loader = RPMDirLoader(self._path)
     loader.setChannel(self)
     self._loaders.append(loader)
     self._digest = digest
     return True
Exemplo n.º 2
0
 def fetch(self, fetcher, progress):
     if not os.path.isdir(self._path):
         raise Error, _("Channel '%s' has invalid directory: %s") % \
                      (self, self._path)
     digest = os.path.getmtime(self._path)
     if digest == self._digest:
         return True
     self.removeLoaders()
     loader = RPMDirLoader(self._path)
     loader.setChannel(self)
     self._loaders.append(loader)
     self._digest = digest
     return True
Exemplo n.º 3
0
 def fetch(self, fetcher, progress):
     if not os.path.isdir(self._path):
         raise Error, _("Channel '%s' has invalid directory: %s") % \
                      (self, self._path)
     digest = os.path.getmtime(self._path)
     if digest == self._digest:
         return True
     self.removeLoaders()
     loader = RPMDirLoader(self._path)
     loader.setChannel(self)
     self._loaders.append(loader)
     if getattr(self, "_recursive", False):
         for root, dirs, files in os.walk(self._path):
             for name in dirs:
                 loader = RPMDirLoader(os.path.join(root, name))
                 loader.setChannel(self)
                 self._loaders.append(loader)
     self._digest = digest
     return True