Appease the linter

This commit is contained in:
Andrew 2022-04-12 19:38:18 -04:00
parent e555274409
commit 92579280a2

View File

@ -1,7 +1,5 @@
import logging import logging
import requests import requests
from app.classes.shared.helpers import helper
from app.classes.web.base_handler import BaseHandler from app.classes.web.base_handler import BaseHandler
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -16,13 +14,15 @@ class HTTPHandlerPage(BaseHandler):
url_list = url.split("/") url_list = url.split("/")
if url_list[0] != "": if url_list[0] != "":
primary_url = url_list[0] + ":" + str(port) + "/" primary_url = url_list[0] + ":" + str(port) + "/"
backup_url = url_list[0] + ":" + str(helper.get_setting("https_port")) + "/" backup_url = (
url_list[0] + ":" + str(self.helper.get_setting("https_port")) + "/"
)
for i in range(len(url_list) - 1): for i in range(len(url_list) - 1):
primary_url += url_list[i + 1] primary_url += url_list[i + 1]
backup_url += url_list[i + 1] backup_url += url_list[i + 1]
else: else:
primary_url = url + str(port) primary_url = url + str(port)
backup_url = url + str(helper.get_setting("https_port")) backup_url = url + str(self.helper.get_setting("https_port"))
try: try:
resp = requests.get(primary_url) resp = requests.get(primary_url)