server/serverctl.py
branch3.5
changeset 3148 81d373245ce9
parent 3115 29262ba01464
child 3163 edfe43ceaa35
child 3316 c4c07aab1c39
equal deleted inserted replaced
3147:83ad6ff13e3f 3148:81d373245ce9
   675 
   675 
   676     def run(self, args):
   676     def run(self, args):
   677         import tempfile
   677         import tempfile
   678         srcappid = pop_arg(args, 1, msg='No source instance specified !')
   678         srcappid = pop_arg(args, 1, msg='No source instance specified !')
   679         destappid = pop_arg(args, msg='No destination instance specified !')
   679         destappid = pop_arg(args, msg='No destination instance specified !')
   680         output = tempfile.mkstemp()[1]
   680         fd, output = tempfile.mkstemp()
       
   681         os.close(fd)
   681         if ':' in srcappid:
   682         if ':' in srcappid:
   682             host, srcappid = srcappid.split(':')
   683             host, srcappid = srcappid.split(':')
   683             _remote_dump(host, srcappid, output, self.config.sudo)
   684             _remote_dump(host, srcappid, output, self.config.sudo)
   684         else:
   685         else:
   685             _local_dump(srcappid, output)
   686             _local_dump(srcappid, output)