for mirror in self:
mirror.check()
- def get(self, id):
- return Mirror(self.backend, id)
-
def get_for_download(self, filename, country_code=None):
# Try to find a good mirror for this country first
if country_code:
return self._get_mirror("SELECT * FROM mirrors \
WHERE hostname = %s", hostname)
- def file_exists(self, filename):
- ret = self.db.get("SELECT 1 FROM mirror_files \
- WHERE filename = %s LIMIT 1", filename)
-
- if ret:
- return True
-
- return False
-
class Mirror(Object):
def init(self, id, data=None):