fix mkstemp() usage in migration commands
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 24 Jul 2009 09:25:15 +0200
changeset 2461 1f38b65cbd20
parent 2460 ce1a7ffc6c90
child 2462 9e670072884d
fix mkstemp() usage in migration commands
common/migration.py
server/serverctl.py
--- a/common/migration.py	Thu Jul 23 17:15:05 2009 +0200
+++ b/common/migration.py	Fri Jul 24 09:25:15 2009 +0200
@@ -337,7 +337,7 @@
         configfile = self.config.main_config_file()
         if self._option_changes:
             read_old_config(self.config, self._option_changes, configfile)
-        newconfig = tempfile.mkstemp()
+        _, newconfig = tempfile.mkstemp()
         for optdescr in self._option_changes:
             if optdescr[0] == 'added':
                 optdict = self.config.get_option_def(optdescr[1])
--- a/server/serverctl.py	Thu Jul 23 17:15:05 2009 +0200
+++ b/server/serverctl.py	Fri Jul 24 09:25:15 2009 +0200
@@ -650,7 +650,7 @@
         import tempfile
         srcappid = pop_arg(args, 1, msg="No source application specified !")
         destappid = pop_arg(args, msg="No destination application specified !")
-        output = tempfile.mkstemp()
+        _, output = tempfile.mkstemp()
         if ':' in srcappid:
             host, srcappid = srcappid.split(':')
             _remote_dump(host, srcappid, output, self.config.sudo)