Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
MAX_MIRRORS = num_mirrors
- for mirror in self.mirrors.get_for_location(self.remote_address):
+ for mirror in self.mirrors.get_for_location(self.current_address):
mirrors.append({
"url" : "/".join((mirror.url, distro.identifier, repo.identifier, arch.name)),
"location" : mirror.country_code,
return self.get_browser_locale()
@property
- def remote_address(self):
+ def current_address(self):
"""
Returns the IP address the request came from.
"""
class MirrorListHandler(BaseHandler):
def get(self):
mirrors = self.pakfire.mirrors.get_all()
- mirrors_nearby = self.pakfire.mirrors.get_for_location(self.remote_address)
+ mirrors_nearby = self.pakfire.mirrors.get_for_location(self.current_address)
mirrors_worldwide = []
for mirror in mirrors: