diff --git a/src/xdevice/_core/testkit/kit_lite.py b/src/xdevice/_core/testkit/kit_lite.py index 0ef9727bb229bd5e3b1075524317fe1748d2c526..7a52d15aab5f418b4dfdf377440647dc5e81564f 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