Skip to content
Snippets Groups Projects
Commit eb8345a3 authored by Christophe Benz's avatar Christophe Benz
Browse files

Use lower provider code to find SQLite file

parent 4dc19caf
No related branches found
No related tags found
No related merge requests found
......@@ -33,10 +33,11 @@ SQL_BEGIN_TRANSACTION = 'BEGIN TRANSACTION'
def get_sqlite_db_path(sqlite_dir_path, provider_code, dataset_code):
sqlite_db_path = Path(sqlite_dir_path) / provider_code / "{}.sqlite".format(dataset_code)
provider_code_lower = provider_code.lower()
sqlite_db_path = Path(sqlite_dir_path) / provider_code_lower / "{}.sqlite".format(dataset_code)
if not sqlite_db_path.is_file():
dataset_id = "{}/{}".format(provider_code, dataset_code)
log.debug("Could not find SQLite index file for {}".format(dataset_id))
log.debug("Could not find SQLite index file for %s (expected %s)", dataset_id, str(sqlite_db_path))
return None
return sqlite_db_path
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment