# HG changeset patch # User Julien Cristau # Date 1446562535 -3600 # Node ID fbefdaa56d2bcbddf05c02b96ff817e0ac0a7c39 # Parent 48f59820ff78e157c28dc665c0783a7df7755cd1 [server] fix db-dump with sqlite 'gzip -c dbname > backupfile' needs to go through the shell. diff -r 48f59820ff78 -r fbefdaa56d2b server/sqlutils.py --- a/server/sqlutils.py Tue Nov 03 15:54:46 2015 +0100 +++ b/server/sqlutils.py Tue Nov 03 15:55:35 2015 +0100 @@ -47,8 +47,12 @@ SQL_PREFIX = 'cw_' def _run_command(cmd): - print(' '.join(cmd)) - return subprocess.call(cmd) + if isinstance(cmd, string_types): + print(cmd) + return subprocess.call(cmd, shell=True) + else: + print(' '.join(cmd)) + return subprocess.call(cmd) def sqlexec(sqlstmts, cursor_or_execute, withpb=True,