Skip to content

Commit

Permalink
📦 docs: 资源商店新增发布资源功能
Browse files Browse the repository at this point in the history
  • Loading branch information
snowykami committed Sep 17, 2024
1 parent 5537bc3 commit b5d3c6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions liteyuki_flow/resource_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def pre_check(github: Github, issue: Issue, repo: Repository) -> err:
z.extractall(f"tmp/{name}")
# 检测包内metadata.yml文件
data = yaml.load(open(f"tmp/{name}/metadata.yml"), Loader=yaml.SafeLoader)
except Exception:
issue.get_comment(cid).edit("解析资源包失败,可能是格式问题或metadata.yml不存在.")
return ValueError("解析资源包失败,可能是格式问题或metadata.yml不存在.")
except Exception as e:
issue.get_comment(cid).edit("解析资源包失败,可能是格式问题或metadata.yml不存在: " + str(e))
return e

# 检测必要字段 name,description,version
if not all((data.get("name"), data.get("description"), data.get("version"))):
Expand Down

0 comments on commit b5d3c6a

Please sign in to comment.