fix error

This commit is contained in:
felinae98 2022-10-09 00:56:42 +08:00
parent 1543ba21d2
commit 0d3198c8a1
No known key found for this signature in database
GPG Key ID: 00C8B010587FF610

View File

@ -215,11 +215,11 @@ def do_add_sub(add_sub: Type[Matcher]):
cats=state.get("cats", []),
tags=state.get("tags", []),
)
await add_sub.finish("添加 {} 成功".format(state["name"]))
except SubscribeDupException:
await add_sub.finish(f"添加 {state['name']} 失败: 已存在该订阅")
except Exception as e:
await add_sub.finish(f"添加 {state['name']} 失败: {e}")
await add_sub.finish("添加 {} 成功".format(state["name"]))
def do_query_sub(query_sub: Type[Matcher]):