File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 22
22
from trino import dbapi as trino_dbapi , logging
23
23
from trino .auth import BasicAuthentication , CertificateAuthentication , JWTAuthentication
24
24
from trino .dbapi import Cursor
25
- from trino .exceptions import TrinoUserError
26
25
from trino .sqlalchemy import compiler , datatype , error
27
26
28
27
logger = logging .get_logger (__name__ )
@@ -320,8 +319,8 @@ def _get_server_version_info(self, connection: Connection) -> Any:
320
319
res = connection .execute (sql .text (query ))
321
320
version = res .scalar ()
322
321
return tuple ([version ])
323
- except TrinoUserError as e :
324
- logger .debug (f"Failed to get server version: { e .message } " )
322
+ except exc . ProgrammingError as e :
323
+ logger .debug (f"Failed to get server version: { e .orig . message } " )
325
324
return None
326
325
327
326
def _get_default_schema_name (self , connection : Connection ) -> Optional [str ]:
You can’t perform that action at this time.
0 commit comments