From 09188aef13c05384064fecc714ba07b0dec16391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Vil=C3=A0?= Date: Wed, 28 Jun 2023 15:26:52 +0200 Subject: [PATCH 1/2] Update SQLiteConnection.py --- equipment/framework/Connection/SQLiteConnection.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/equipment/framework/Connection/SQLiteConnection.py b/equipment/framework/Connection/SQLiteConnection.py index 8b74542..a89b829 100755 --- a/equipment/framework/Connection/SQLiteConnection.py +++ b/equipment/framework/Connection/SQLiteConnection.py @@ -16,8 +16,7 @@ def connect(self) -> bool: schema = self.config.get(self.name, 'schema') path = self.config.get(self.name, 'path') db = path if path == self.memory else os.path.join( - os.path.dirname(os.path.realpath(__file__)), - '../../', + os.path.join(os.getcwd(), '../') if os.path.isfile(os.path.join(os.getcwd(), 'alembic.ini')) else os.getcwd(), path ) From 0bb68f7bfd34a56525b46570241fedb8d44087c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Vil=C3=A0?= Date: Wed, 28 Jun 2023 15:33:47 +0200 Subject: [PATCH 2/2] Update SQLiteConnection.py --- equipment/framework/Connection/SQLiteConnection.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/equipment/framework/Connection/SQLiteConnection.py b/equipment/framework/Connection/SQLiteConnection.py index a89b829..25a1d0f 100755 --- a/equipment/framework/Connection/SQLiteConnection.py +++ b/equipment/framework/Connection/SQLiteConnection.py @@ -15,8 +15,10 @@ def connect(self) -> bool: try: schema = self.config.get(self.name, 'schema') path = self.config.get(self.name, 'path') + base_path = os.path.join(os.getcwd(), '../') if os.path.isfile(os.path.join(os.getcwd(), 'alembic.ini')) else os.getcwd() + db = path if path == self.memory else os.path.join( - os.path.join(os.getcwd(), '../') if os.path.isfile(os.path.join(os.getcwd(), 'alembic.ini')) else os.getcwd(), + base_path, path )