Commit fa8f61d4 authored by gustixjerk's avatar gustixjerk

fix(settings): safely import pysqlite3 with fallback to built-in sqlite3

parent da29d648
...@@ -11,10 +11,13 @@ berjalan di SQLite maupun PostgreSQL. ...@@ -11,10 +11,13 @@ berjalan di SQLite maupun PostgreSQL.
# ---------------------------------------------------------------- sqlite3 patch # ---------------------------------------------------------------- sqlite3 patch
# Mencegah error 'deterministic=True requires SQLite 3.8.3 or higher' di server Linux # Mencegah error 'deterministic=True requires SQLite 3.8.3 or higher' di server Linux
import sys try:
import pysqlite3 import sys
import pysqlite3
sys.modules["sqlite3"] = sys.modules.pop("pysqlite3") sys.modules["sqlite3"] = sys.modules.pop("pysqlite3")
except ImportError:
pass
import os import os
from datetime import timedelta from datetime import timedelta
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment