From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 092CA593A for ; Wed, 23 Dec 2015 11:04:32 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 23 Dec 2015 02:04:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,468,1444719600"; d="scan'208";a="847021964" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 23 Dec 2015 02:04:31 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id tBNA4TLX004197; Wed, 23 Dec 2015 18:04:29 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id tBNA4QL0004771; Wed, 23 Dec 2015 18:04:28 +0800 Received: (from jingguox@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id tBNA4Qwm004767; Wed, 23 Dec 2015 18:04:26 +0800 From: Jingguo Fu To: dts@dpdk.org Date: Wed, 23 Dec 2015 18:04:20 +0800 Message-Id: <1450865062-4730-2-git-send-email-jingguox.fu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1450865062-4730-1-git-send-email-jingguox.fu@intel.com> References: <1450865062-4730-1-git-send-email-jingguox.fu@intel.com> Cc: Jingguo Fu Subject: [dts] [DTS][PATCH 2/4] virt: add copy file from virt guest X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Dec 2015 10:04:33 -0000 Signed-off-by: Jingguo Fu --- framework/ssh_pexpect.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py index 046692f..96c4409 100644 --- a/framework/ssh_pexpect.py +++ b/framework/ssh_pexpect.py @@ -141,6 +141,9 @@ class SSHPexpect(object): Copies a file from a remote place into local. """ command = 'scp {0}@{1}:{2} {3}'.format(self.username, self.host, src, dst) + if ':' in self.host: + command = 'scp -P {0} -o NoHostAuthenticationForLocalhost=yes {1}@{2}:{3} {4}'.format( + str(self.port), self.username, self.ip, src, dst) if password == '': self._spawn_scp(command, self.password) else: -- 2.1.0