From 007404f46a0c317685197b4c5616f27994f3d3ff Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Mon, 12 Feb 2024 18:02:13 +0100 Subject: [PATCH] Use isolation_level=None mode for GNU Hurd --- core/fs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/fs.py b/core/fs.py index e927fd0b..13e6ab52 100644 --- a/core/fs.py +++ b/core/fs.py @@ -16,6 +16,7 @@ from math import floor import logging import sqlite3 +from sys import platform from threading import Lock from typing import Any, AnyStr, Union, Callable @@ -118,7 +119,10 @@ def __init__(self): self.lock = None def connect(self, path: Union[AnyStr, os.PathLike]) -> None: - self.conn = sqlite3.connect(path, check_same_thread=False) + if platform.startswith("gnu0"): + self.conn = sqlite3.connect(path, check_same_thread=False, isolation_level=None) + else: + self.conn = sqlite3.connect(path, check_same_thread=False) self.lock = Lock() self._check_upgrade()