File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 11import base64
22import json
3+ import os
34import platform
45import urllib .parse
56from decimal import Decimal
3233from common .core .config import settings
3334
3435try :
35- oracledb .init_oracle_client (
36- lib_dir = settings .ORACLE_CLIENT_PATH
37- )
38- SQLBotLogUtil .info ("init oracle client success, use thick mode" )
39- except Exception :
40- SQLBotLogUtil .error ("init oracle client failed, use thin mode" )
36+ if os .path .exists (settings .ORACLE_CLIENT_PATH ):
37+ oracledb .init_oracle_client (
38+ lib_dir = settings .ORACLE_CLIENT_PATH
39+ )
40+ SQLBotLogUtil .info ("init oracle client success, use thick mode" )
41+ else :
42+ SQLBotLogUtil .info ("init oracle client failed, because not found oracle client, use thin mode" )
43+ except Exception as e :
44+ SQLBotLogUtil .error ("init oracle client failed, check your client is installed, use thin mode" )
4145
4246
4347def get_uri (ds : CoreDatasource ) -> str :
You can’t perform that action at this time.
0 commit comments