mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure backup/restore/maintenance works with invalid pgpass file parameter. #6820
This commit is contained in:
parent
695c008245
commit
0d8adf9ced
@ -309,6 +309,8 @@ class BatchProcess:
|
||||
if self.env:
|
||||
env.update(self.env)
|
||||
|
||||
current_app.logger.debug(self.env)
|
||||
|
||||
if cb is not None:
|
||||
cb(env)
|
||||
if os.name == 'nt':
|
||||
@ -839,8 +841,10 @@ class BatchProcess:
|
||||
isinstance(self.manager_obj.connection_params, dict) and \
|
||||
'passfile' in self.manager_obj.connection_params and \
|
||||
self.manager_obj.connection_params['passfile']:
|
||||
self.env['PGPASSFILE'] = get_complete_file_path(
|
||||
pgpasspath = get_complete_file_path(
|
||||
self.manager_obj.connection_params['passfile'])
|
||||
if pgpasspath is not None:
|
||||
self.env['PGPASSFILE'] = pgpasspath
|
||||
|
||||
# Check for connection timeout and if it is greater than 0 then
|
||||
# set the environment variable PGCONNECT_TIMEOUT.
|
||||
|
Loading…
Reference in New Issue
Block a user