From 0688097a26f652dc2a4fd085a4c9aaf568527532 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Mon, 11 Nov 2024 23:42:40 -0600 Subject: [PATCH] app/dynamic_node_id: don't assume single-threading Let SQLite verify that for us instead of silently corrupting itself. --- dronecan/app/dynamic_node_id.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dronecan/app/dynamic_node_id.py b/dronecan/app/dynamic_node_id.py index ee41dc3..dc535c6 100644 --- a/dronecan/app/dynamic_node_id.py +++ b/dronecan/app/dynamic_node_id.py @@ -29,8 +29,7 @@ class CentralizedServer(object): class AllocationTable(object): def __init__(self, path): - # Disabling same thread check on the assumption that the developer knows what they are doing. - self.db = sqlite3.connect(path, check_same_thread=False) # @UndefinedVariable + self.db = sqlite3.connect(path) # @UndefinedVariable self._modify('''CREATE TABLE IF NOT EXISTS `allocation` ( `node_id` INTEGER NOT NULL UNIQUE,