fix resource

This commit is contained in:
jxxghp 2024-03-17 15:09:10 +08:00
parent 49ab5ac709
commit 14ff1e9af6
2 changed files with 2 additions and 4 deletions

View File

@ -57,10 +57,6 @@ class ResourceHelper(metaclass=Singleton):
# 判断平台 # 判断平台
if platform and platform != SystemUtils.platform(): if platform and platform != SystemUtils.platform():
continue continue
# 判断本地是否存在
local_path = self._base_dir / target / rname
if not local_path.exists():
continue
# 判断版本号 # 判断版本号
if rtype == "auth": if rtype == "auth":
# 站点认证资源 # 站点认证资源

View File

@ -437,6 +437,8 @@ class SystemUtils:
""" """
执行Docker重启操作 执行Docker重启操作
""" """
if not SystemUtils.is_docker():
return False, "非Docker环境无法重启"
try: try:
# 创建 Docker 客户端 # 创建 Docker 客户端
client = docker.DockerClient(base_url='tcp://127.0.0.1:38379') client = docker.DockerClient(base_url='tcp://127.0.0.1:38379')