mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Only allow specification of a pgpass file if libpq >= 10. Fixes #2768
This commit is contained in:
committed by
Dave Page
parent
63103c7a48
commit
2f5a2b2392
@@ -2043,6 +2043,18 @@ class Driver(BaseDriver):
|
||||
"Driver Version information for psycopg2 is not available!"
|
||||
)
|
||||
|
||||
def libpq_version(cls):
|
||||
"""
|
||||
Returns the loaded libpq version
|
||||
"""
|
||||
version = getattr(psycopg2, '__libpq_version__', None)
|
||||
if version:
|
||||
return version
|
||||
|
||||
raise Exception(
|
||||
"libpq version information is not available!"
|
||||
)
|
||||
|
||||
def get_connection(
|
||||
self, sid, database=None, conn_id=None, auto_reconnect=True
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user