Fix guidelines

This commit is contained in:
Cédric Krier committed 2009-05-23 15:44:36 +02:00
1 parent 9e47032635
commit eea0a0a24d
1 file changed
+2 -2
+2 -2
View File
@@ -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)