mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: hive config
This commit is contained in:
@@ -365,9 +365,10 @@ def check_connection(trans: Optional[Trans], ds: CoreDatasource | AssistantOutDs
|
||||
raise HTTPException(status_code=500, detail=trans('i18n_ds_invalid') + f': {e.args}')
|
||||
return False
|
||||
elif equals_ignore_case(ds.type, 'hive'):
|
||||
if conf.password:
|
||||
extra_config_dict['password'] = conf.password
|
||||
extra_config_dict['auth'] = 'LDAP'
|
||||
with hive.connect(host=conf.host, port=conf.port, username=conf.username, database=conf.database,
|
||||
password=conf.password if conf.password else None,
|
||||
auth='LDAP' if conf.password else None,
|
||||
**extra_config_dict) as conn, conn.cursor() as cursor:
|
||||
try:
|
||||
cursor.execute('select 1')
|
||||
|
||||
Reference in New Issue
Block a user