Fix query in the datanommer SAR script

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2018-05-22 10:21:42 +02:00
parent 5a319bdcfc
commit 4de44ac0fc

View file

@ -36,7 +36,7 @@ COPY (
)
TO STDOUT delimiter ',' CSV header;
'''
query = query.format(username=username, tmpfile=tempfilename)
query = query.format(username=username)
command = ['sudo', '-u', 'postgres', 'psql', 'datanommer', '-c', '"%s"' % query]
subprocess.check_call(' '.join(command), shell=True, cwd='/tmp')