]> git.ipfire.org Git - people/jschlag/pbs.git/commitdiff
web: Rename remote_address to current_address
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Oct 2017 12:10:35 +0000 (13:10 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Oct 2017 12:10:35 +0000 (13:10 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/handlers.py
src/web/handlers_base.py
src/web/handlers_mirrors.py

index 844dcbb8500fbef6449e0bbeccb1c91cd9b848a5..24033111debd4031d6ddbd20bf6fd4343fb03363 100644 (file)
@@ -240,7 +240,7 @@ class RepositoryMirrorlistHandler(BaseHandler):
                                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,
index dc4b1032305381bf5d8e73d0d78868da052d38be..a65fa9f59ed231ebc34ff8681083b0090804f6de 100644 (file)
@@ -50,7 +50,7 @@ class BaseHandler(tornado.web.RequestHandler):
                return self.get_browser_locale()
 
        @property
-       def remote_address(self):
+       def current_address(self):
                """
                        Returns the IP address the request came from.
                """
index dabcc38c3149776a60fa2bec468cafe7e3745433..4e4d7e35382ce8d51ec15ea90c26809d707a89a3 100644 (file)
@@ -9,7 +9,7 @@ from .handlers_base import BaseHandler
 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: