Fixes on deployment

This commit is contained in:
Marc Aymerich 2015-10-02 09:39:58 +00:00
parent eeca05ec55
commit b7007903f0

View file

@ -30,7 +30,7 @@ class Command(BaseCommand):
default=defaults.get('DB_USER', 'orchestra'), default=defaults.get('DB_USER', 'orchestra'),
help='Specifies the database to create.'), help='Specifies the database to create.'),
make_option('--db_password', dest='db_password', make_option('--db_password', dest='db_password',
default=defaults.get('PASSWORD'), default=defaults.get('PASSWORD', ''),
help='Specifies the database password, random if not specified.'), help='Specifies the database password, random if not specified.'),
make_option('--db_host', dest='db_host', make_option('--db_host', dest='db_host',
default=defaults.get('HOST', 'localhost'), default=defaults.get('HOST', 'localhost'),
@ -48,7 +48,6 @@ class Command(BaseCommand):
help = 'Setup PostgreSQL database.' help = 'Setup PostgreSQL database.'
def run_postgres(self, cmd, *args, **kwargs): def run_postgres(self, cmd, *args, **kwargs):
cmd = cmd.replace("'", "\\'")
return run('su postgres -c "psql -c \\"%s\\""' % cmd, *args, display=True, **kwargs) return run('su postgres -c "psql -c \\"%s\\""' % cmd, *args, display=True, **kwargs)
@check_root @check_root