Skip to content

Commit

Permalink
Use isolation_level=None mode for GNU Hurd
Browse files Browse the repository at this point in the history
  • Loading branch information
dktrkranz committed Feb 12, 2024
1 parent 4385b50 commit bea10c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -117,8 +118,11 @@ def __init__(self):
self.conn = None
self.lock = None

def connect(self, path: Union[AnyStr, os.PathLike]) -> None:
self.conn = sqlite3.connect(path, check_same_thread=False)
def connect(self, path: Union[AnyStr, os.PathLike]) -> None:2
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()

Expand Down

0 comments on commit bea10c3

Please sign in to comment.