merge stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Mon, 01 Feb 2010 17:49:59 +0100
branchstable
changeset 4417 8cd447d11aed
parent 4411 d0bde029f625 (current diff)
parent 4416 94a3a2dec8fc (diff)
child 4418 4755ef8253cd
merge
--- a/server/sqlutils.py	Fri Jan 29 18:03:10 2010 +0100
+++ b/server/sqlutils.py	Mon Feb 01 17:49:59 2010 +0100
@@ -174,7 +174,7 @@
         cmd = self.dbhelper.backup_command(self.dbname, self.dbhost,
                                            self.dbuser, backupfile,
                                            keepownership=False)
-        if subprocess.call(cmd):
+        if subprocess.call(cmd, shell=isinstance(cmd, str)):
             raise Exception('Failed command: %s' % cmd)
 
     def restore_from_file(self, backupfile, confirm, drop=True):
@@ -183,7 +183,7 @@
                                                   self.encoding,
                                                   keepownership=False,
                                                   drop=drop):
-            if subprocess.call(cmd):
+            if subprocess.call(cmd, shell=isinstance(cmd, str)):
                 print '-> Failed command: %s' % cmd
                 if not confirm('Continue anyway?', default='n'):
                     raise Exception('Failed command: %s' % cmd)