Commit 20726c97 authored by 金凯强's avatar 金凯强 🎨

异常报错处理修改

parent 9cae8bcb
Pipeline #21141 passed with stage
in 27 seconds
...@@ -385,7 +385,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym ...@@ -385,7 +385,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
file_name = deploy_image.replace('/', '___').replace(':', '__') + '.tar' file_name = deploy_image.replace('/', '___').replace(':', '__') + '.tar'
_cmd = 'docker save {} -o {}/{}'.format(deploy_image, upgrade_no_back_up_dir, file_name) _cmd = 'docker save {} -o {}/{}'.format(deploy_image, upgrade_no_back_up_dir, file_name)
result = os.system(_cmd) result = os.system(_cmd)
if result == 1: if result != 0:
raise RuntimeError("{}执行出错".format(_cmd)) raise RuntimeError("{}执行出错".format(_cmd))
logger.info(f'镜像生成完毕,目录为{upgrade_no_back_up_dir}') logger.info(f'镜像生成完毕,目录为{upgrade_no_back_up_dir}')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment