From b64882d65ceb8d989e4481cf72b86a3393568895 Mon Sep 17 00:00:00 2001 From: Paul van Genuchten Date: Tue, 24 May 2022 22:41:23 +0200 Subject: [PATCH] this sets access mode to readonly, it is required if filesystem is readonly, else tynidb provider will throw an error. if at some point pygeoapi allows transactions, we should make a more advanced check here (verify if readonly file first) resolves #909 --- pygeoapi/provider/tinydb_.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygeoapi/provider/tinydb_.py b/pygeoapi/provider/tinydb_.py index 00ab56e..12cb17a 100644 --- a/pygeoapi/provider/tinydb_.py +++ b/pygeoapi/provider/tinydb_.py @@ -65,7 +65,7 @@ class TinyDBCatalogueProvider(BaseProvider): LOGGER.error(msg) raise ProviderConnectionError(msg) - self.db = TinyDB(self.data) + self.db = TinyDB(self.data, access_mode="r") self.fields = self.get_fields()