Skip to content

Commit 8fce9bd

Browse files
committed
used platform module to check running platform
1 parent beb2c1a commit 8fce9bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

biasanalyzer/database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ruff: noqa: S608
22
import gc
3-
import sys
3+
import platform
44
from datetime import datetime
55
from typing import Optional
66

@@ -338,7 +338,7 @@ def _initialize(self, db_url):
338338

339339
# Handle DuckDB connection
340340
try:
341-
if sys.platform.startswith("win"): # pragma: no cover
341+
if platform.system().lower() == "windows": # pragma: no cover
342342
# it is critical to set duckdb connection to be read-only on windows platform
343343
self.engine = duckdb.connect(db_url, read_only=True)
344344
else:

0 commit comments

Comments
 (0)