diff --git a/DeployDevice/src/func/liteOsUpgrade/liteOsUpgrade_RK3568_app.py b/DeployDevice/src/func/liteOsUpgrade/liteOsUpgrade_RK3568_app.py index afdb4cc5d5e77d1b7e637ebddfd75e0fd2cb180c..9f5816122723f430ee0f2f8c81e91fd90b86e459 100644 --- a/DeployDevice/src/func/liteOsUpgrade/liteOsUpgrade_RK3568_app.py +++ b/DeployDevice/src/func/liteOsUpgrade/liteOsUpgrade_RK3568_app.py @@ -122,6 +122,12 @@ class liteOsUpgrade_RK3568(BaseApp): logger.info(scriptpath) local_image_path = os.path.join(version_savepath) logger.info(local_image_path) + # 判断是否存在smoke_check.json文件 + smoke_check_file = os.path.join(local_image_path, 'smoke_check.json') + if os.path.exists(smoke_check_file): + logger.info("smoke_check.json file exist, return True directly, file path is %s" % smoke_check_file) + delete_file_lock(lock_file) + return True if system_type == "Windows": loader_tool_path = os.path.join(scriptpath, "resource", "RK3568_tool", "upgrade_tool.exe") else: @@ -613,6 +619,8 @@ def is_can_exec(lock_file): lock_time = os.path.getmtime(lock_file) current_time = time.time() # 判断锁是否超时 + if (current_time - lock_time) < 10: + return True if (current_time - lock_time) < lock_duration: logger.error("ask is already running. Exiting.") return False