Improved error handling
This commit is contained in:
parent
4e1c7d2941
commit
6ff112156d
|
|
@ -166,7 +166,7 @@ def add_distance_after(filename: str, base_location: dict):
|
|||
with open(filename, "r") as file:
|
||||
data = json.load(file)
|
||||
except FileNotFoundError:
|
||||
print("No file by that name")
|
||||
print(f"No file by that name: {filename}")
|
||||
return None
|
||||
|
||||
distance = "Unknown"
|
||||
|
|
@ -185,9 +185,7 @@ def add_distance_after(filename: str, base_location: dict):
|
|||
|
||||
if __name__ == "__main__":
|
||||
filenames = [
|
||||
"/home/madrigal/repos/range-testing/data/boat_relay_sept_18/test_1758215714_copy.json",
|
||||
"/home/madrigal/repos/range-testing/data/boat_relay_sept_18/test_1758217711_copy.json",
|
||||
"/home/madrigal/repos/range-testing/data/boat_relay_sept_18/test_1758219350_copy.json",
|
||||
"/home/madrigal/repos/range-testing/data/boat_relay_oct_9/w_locations/test_1760031451.json",
|
||||
]
|
||||
base_location = {
|
||||
"latitude": 43.656328,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user