From 7d950dd004890bcb336c4c41d4418b0102c9d644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=98=8E=E6=98=9F?= Date: Fri, 14 Jan 2022 03:38:08 +0000 Subject: [PATCH] fixed 3e38e4c from https://gitee.com/mingxingyu/test_xdevice/pulls/73 update src/xdevice/_core/testkit/kit_lite.py. Signed-off-by: yumingxing --- src/xdevice/_core/testkit/kit_lite.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xdevice/_core/testkit/kit_lite.py b/src/xdevice/_core/testkit/kit_lite.py index 0ef9727..7a52d15 100644 --- a/src/xdevice/_core/testkit/kit_lite.py +++ b/src/xdevice/_core/testkit/kit_lite.py @@ -348,6 +348,11 @@ class MountKit(ITestKit): # local copy else: for count in range(1, 4): + try: + os.remove(os.path.join(remote_info.get("dir"), + os.path.basename(_file))) + except Exception as _: + pass shutil.copy(_file, remote_info.get("dir")) if check_server_file(_file, remote_info.get("dir")): break