File tree Expand file tree Collapse file tree
web/pgadmin/utils/driver/psycopg3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717import secrets
1818import datetime
1919import asyncio
20+ import copy
2021from collections import deque
21- from pathlib import Path
2222import psycopg
2323from flask import g , current_app
2424from flask_babel import gettext
@@ -281,6 +281,7 @@ def connect(self, **kwargs):
281281 password , encpass , is_update_password = \
282282 self ._check_user_password (kwargs )
283283
284+ passfile = kwargs ['passfile' ] if 'passfile' in kwargs else None
284285 tunnel_password = kwargs ['tunnel_password' ] if 'tunnel_password' in \
285286 kwargs else ''
286287
@@ -312,15 +313,6 @@ def connect(self, **kwargs):
312313 if is_error :
313314 return False , errmsg
314315
315- # Retrieve password from passfile, if one has not been set yet.
316- passfile = Path (kwargs ['passfile' ]) if 'passfile' in kwargs else None
317- if not password and passfile :
318- try :
319- password = passfile .read_text (encoding = 'utf-8' ).strip ()
320- except (OSError , UnicodeDecodeError ) as e :
321- error = _ ("Failed to read PassFile.\n Error: {0}" ).format (str (e ))
322- return False , error
323-
324316 # If no password credential is found then connect request might
325317 # come from Query tool, ViewData grid, debugger etc tools.
326318 # we will check for pgpass file availability from connection manager
You can’t perform that action at this time.
0 commit comments