server/serverctl.py
branch3.5
changeset 3316 c4c07aab1c39
parent 3303 f961392e7517
parent 3148 81d373245ce9
child 3369 7b88d12b4ee2
child 3539 f3b14d052798
equal deleted inserted replaced
3314:cfa77453e742 3316:c4c07aab1c39
   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)