cx-oracle

1 parent ee2fa459
...@@ -295,10 +295,14 @@ def get_connection(settings=None): ...@@ -295,10 +295,14 @@ def get_connection(settings=None):
settings = get_settings() settings = get_settings()
if "lib_dir" in settings and settings["lib_dir"]: if "lib_dir" in settings and settings["lib_dir"]:
import cx_Oracle try:
from cx_Oracle import init_oracle_client
except:
from oracledb import init_oracle_client
lib_dir = rf"{settings['lib_dir']}" lib_dir = rf"{settings['lib_dir']}"
cx_Oracle.init_oracle_client(lib_dir=lib_dir) init_oracle_client(lib_dir=lib_dir)
logg.debug(lib_dir)
url = 'pbb.url' in settings and settings['pbb.url'] and 'pbb.' or '' url = 'pbb.url' in settings and settings['pbb.url'] and 'pbb.' or ''
if not url: if not url:
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!