When instantiating the GeoDistance class at the same time in parallel, there's a chance for the STORAGE_DIR to be created in a separate process between the check and the creation which raises a FileExistsError.
This simply adds a try/except around the os.mkdir(STORAGE_DIR) command to protect against this case.
When instantiating the GeoDistance class at the same time in parallel, there's a chance for the STORAGE_DIR to be created in a separate process between the check and the creation which raises a FileExistsError.
This simply adds a try/except around the
os.mkdir(STORAGE_DIR)
command to protect against this case.