Fix guidelines
This commit is contained in:
1 parent
9e47032635
commit
eea0a0a24d
1 file changed
+2
-2
@@ -52,14 +52,14 @@ def exec_pg_command_pipe(name, *args):
|
||||
cmd = '"' + prog + '" ' + ' '.join(args)
|
||||
else:
|
||||
cmd = prog + ' ' + ' '.join(args)
|
||||
|
||||
|
||||
# if db_password is set in configuration we should pass
|
||||
# an environment variable PGPASSWORD to our subprocess
|
||||
# see libpg documentation
|
||||
child_env = dict(os.environ)
|
||||
if CONFIG['db_password']:
|
||||
child_env['PGPASSWORD'] = CONFIG['db_password']
|
||||
pipe = subprocess.Popen(cmd, shell=True,
|
||||
pipe = subprocess.Popen(cmd, shell=True,
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||
close_fds=True,
|
||||
env=child_env)
|
||||
|
||||
Reference in new issue
Block a user