diff --git a/config/v201/init_device_model_db.py b/config/v201/init_device_model_db.py index d756dd8cd..bbda1be36 100644 --- a/config/v201/init_device_model_db.py +++ b/config/v201/init_device_model_db.py @@ -351,8 +351,8 @@ def _read_component_default_values(self, schemas_path: Path) -> dict[ database_initializer = DeviceModelDatabaseInitializer(database_file) if "init" in commands: - tmp_path = Path("/tmp/ocpp201") - if tmp_path == database_file or tmp_path in database_file.parents: # nosec + tmp_path = Path("/tmp/ocpp201") # nosec + if tmp_path == database_file or tmp_path in database_file.parents: tmp_path.mkdir(parents=True, exist_ok=True) database_initializer.initialize_database(schemas_path)