plugin-backend #1
@ -34,34 +34,34 @@ def session_key(session, key):
|
|||||||
def index(request):
|
def index(request):
|
||||||
listen_address = session_key(request.session, "listen_address")
|
listen_address = session_key(request.session, "listen_address")
|
||||||
|
|
||||||
try:
|
# try:
|
||||||
request_overview_data = requests.get(
|
# request_overview_data = requests.get(
|
||||||
f"{listen_address}overview", timeout=5, verify=True
|
# f"{listen_address}overview", timeout=5, verify=True
|
||||||
).text
|
# ).text
|
||||||
request_items_data = requests.get(
|
# request_items_data = requests.get(
|
||||||
f"{listen_address}items", timeout=5, verify=True
|
# f"{listen_address}items", timeout=5, verify=True
|
||||||
).text
|
# ).text
|
||||||
request_doors_data = requests.get(
|
# request_doors_data = requests.get(
|
||||||
f"{listen_address}doors", timeout=5, verify=True
|
# f"{listen_address}doors", timeout=5, verify=True
|
||||||
).text
|
# ).text
|
||||||
request_hints_data = requests.get(
|
# request_hints_data = requests.get(
|
||||||
f"{listen_address}hints", timeout=5, verify=True
|
# f"{listen_address}hints", timeout=5, verify=True
|
||||||
).text
|
# ).text
|
||||||
tracker_overview_data = loads(request_overview_data)
|
# tracker_overview_data = loads(request_overview_data)
|
||||||
if "error" in tracker_overview_data.keys():
|
# if "error" in tracker_overview_data.keys():
|
||||||
raise ValueError
|
# raise ValueError
|
||||||
tracker_items_data = loads(request_items_data)
|
# tracker_items_data = loads(request_items_data)
|
||||||
tracker_doors_data = loads(request_doors_data)
|
# tracker_doors_data = loads(request_doors_data)
|
||||||
tracker_hints_data = loads(request_hints_data)
|
# tracker_hints_data = loads(request_hints_data)
|
||||||
except:
|
# except:
|
||||||
with open("empty_overview.json", "r") as t:
|
with open("empty_overview.json", "r") as t:
|
||||||
tracker_overview_data = loads(t.read())
|
tracker_overview_data = loads(t.read())
|
||||||
with open("empty_items.json", "r") as t:
|
with open("empty_items.json", "r") as t:
|
||||||
tracker_items_data = loads(t.read())
|
tracker_items_data = loads(t.read())
|
||||||
with open("empty_doors.json", "r") as t:
|
with open("empty_doors.json", "r") as t:
|
||||||
tracker_doors_data = loads(t.read())
|
tracker_doors_data = loads(t.read())
|
||||||
with open("empty_hints.json", "r") as t:
|
with open("empty_hints.json", "r") as t:
|
||||||
tracker_hints_data = loads(t.read())
|
tracker_hints_data = loads(t.read())
|
||||||
with open("tracker/static/tracker/data/holy_cross_codes.json", "r") as t:
|
with open("tracker/static/tracker/data/holy_cross_codes.json", "r") as t:
|
||||||
try:
|
try:
|
||||||
temp_codes = loads(t.read())
|
temp_codes = loads(t.read())
|
||||||
|
Loading…
Reference in New Issue
Block a user