提交 6aa218b6 编写于 作者: A alex_hold 提交者: Gitee

update extension/src/xdevice_extension/_core/environment/dmlib.py.

Signed-off-by:<hejian3@huawei.com>
上级 641d0bea
......@@ -753,10 +753,6 @@ class HdcHelper:
sock = HdcHelper.socket(host=device.host, port=device.port,
timeout=DEFAULT_TIMEOUT)
HdcHelper.handle_shake(sock, device.device_sn)
local_end = os.path.split(local)[-1]
remote_end = os.path.split(remote)[-1]
if not local_end == remote_end:
remote = os.path.join(remote, local_end)
request = HdcHelper.form_hdc_request("file send %s %s" %
(local, remote))
HdcHelper.write(sock, request)
......@@ -772,15 +768,9 @@ class HdcHelper:
device.log.info("%s execute command: hdc file recv %s to %s" %
(convert_serial(device.device_sn), remote, local))
if not os.path.exists(local):
raise HdcError("Local path doesn't exist.")
sock = HdcHelper.socket(host=device.host, port=device.port,
timeout=DEFAULT_TIMEOUT)
HdcHelper.handle_shake(sock, device.device_sn)
local_end = os.path.split(local)[-1]
remote_end = os.path.split(remote)[-1]
if not local_end == remote_end:
remote = os.path.join(remote, local_end)
request = HdcHelper.form_hdc_request("file recv %s %s" %
(local, remote))
HdcHelper.write(sock, request)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册