From 62139fc4eb1e66921a0fc0c97d7c0f788a228f05 Mon Sep 17 00:00:00 2001 From: Walter Date: Sat, 31 Oct 2020 16:35:10 -0500 Subject: [PATCH] Fix Nevada landmap not loading logging on open try except block --- theater/conflicttheater.py | 2 +- theater/landmap.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/theater/conflicttheater.py b/theater/conflicttheater.py index 4095f2aa..373eb959 100644 --- a/theater/conflicttheater.py +++ b/theater/conflicttheater.py @@ -238,7 +238,7 @@ class NevadaTheater(ConflictTheater): overview_image = "nevada.gif" reference_points = {(nevada.Mina_Airport_3Q0.position.x, nevada.Mina_Airport_3Q0.position.y): (45 * 2, -360 * 2), (nevada.Laughlin_Airport.position.x, nevada.Laughlin_Airport.position.y): (440 * 2, 80 * 2), } - landmap = load_landmap("resources\\nev_landmap.p") + landmap = load_landmap("resources\\nevlandmap.p") daytime_map = { "dawn": (4, 6), "day": (6, 17), diff --git a/theater/landmap.py b/theater/landmap.py index b1503e38..0f7395c8 100644 --- a/theater/landmap.py +++ b/theater/landmap.py @@ -1,5 +1,6 @@ import pickle from typing import Collection, Optional, Tuple +import logging Zone = Collection[Tuple[float, float]] Landmap = Tuple[Collection[Zone], Collection[Zone], Collection[Zone]] @@ -10,6 +11,7 @@ def load_landmap(filename: str) -> Optional[Landmap]: with open(filename, "rb") as f: return pickle.load(f) except: + logging.exception(f"Failed to load landmap {filename}") return None