diff --git a/DeployDevice/src/func/liteOsUpgrade/liteOsUpgrade_RK3568_app.py b/DeployDevice/src/func/liteOsUpgrade/liteOsUpgrade_RK3568_app.py index b2dff16b6c749e362915ada3a7d5dc92c8223ee3..9b208614a508b068341051766203adfd5fdf1f63 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