Fix bug when constructing pg_dump command

This commit is contained in:
Lance Edgar 2018-07-05 03:18:51 -05:00
parent f185169c43
commit b9b66f636e

View file

@ -308,7 +308,7 @@ class Backup(Subcommand):
tmp_path = '/tmp/{}.sql'.format(name) tmp_path = '/tmp/{}.sql'.format(name)
if os.path.exists(tmp_path): if os.path.exists(tmp_path):
os.remove(tmp_path) os.remove(tmp_path)
pg_dump = ['sudo', '-u', 'postgres', 'pg_dump', verbose] pg_dump = ['sudo', '-u', 'postgres', 'pg_dump']
if False: # TODO if False: # TODO
pg_dump.append('--verbose') pg_dump.append('--verbose')
cmd = pg_dump + [name, '--file={}'.format(tmp_path)] cmd = pg_dump + [name, '--file={}'.format(tmp_path)]