amazing cache #55
| @@ -334,13 +334,11 @@ def fill_cache(): | |||||||
|                 # Read the whole file content as a string |                 # Read the whole file content as a string | ||||||
|                 with open(entry.path, 'r') as f: |                 with open(entry.path, 'r') as f: | ||||||
|                     try : |                     try : | ||||||
|  |                         # load data and fill the cache with the query and key | ||||||
|                         json_data = json.load(f) |                         json_data = json.load(f) | ||||||
|  |                         overpass.fill_cache(json_data) | ||||||
|                     except Exception as exc : |                     except Exception as exc : | ||||||
|                         overpass.logger.error(f'An error occured while parsing file {f} as .json file') |                         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 |                 # Now delete the file as the cache is filled | ||||||
|                 os.remove(entry.path) |                 os.remove(entry.path) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user