From 1240f86d6efa5c63477232f6e81a3c8fc7c6ea62 Mon Sep 17 00:00:00 2001 From: Helldragon67 Date: Tue, 28 Jan 2025 15:59:01 +0100 Subject: [PATCH] damn xml --- backend/src/overpass/overpass.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/src/overpass/overpass.py b/backend/src/overpass/overpass.py index 64fbbcc..cb692ca 100644 --- a/backend/src/overpass/overpass.py +++ b/backend/src/overpass/overpass.py @@ -334,13 +334,11 @@ def fill_cache(): # Read the whole file content as a string with open(entry.path, 'r') as f: try : + # load data and fill the cache with the query and key json_data = json.load(f) + overpass.fill_cache(json_data) except Exception as exc : overpass.logger.error(f'An error occured while parsing file {f} as .json file') - - - # Fill the cache with the query and key - overpass.fill_cache(json_data) # Now delete the file as the cache is filled os.remove(entry.path)