diff options
| author | Kyomotoi <kyomotoiowo@gmail.com> | 2022-06-25 21:01:44 +0800 | 
|---|---|---|
| committer | Kyomotoi <kyomotoiowo@gmail.com> | 2022-06-25 21:01:44 +0800 | 
| commit | 37df264d7e9acb624767bdb654eed01d49137aa3 (patch) | |
| tree | c866b73cde36139d515d530d889976f4b84171a2 | |
| parent | a96f0453fb111ef105224ef3cc003c60b940c349 (diff) | |
| download | ATRI-37df264d7e9acb624767bdb654eed01d49137aa3.tar.gz ATRI-37df264d7e9acb624767bdb654eed01d49137aa3.tar.bz2 ATRI-37df264d7e9acb624767bdb654eed01d49137aa3.zip | |
🚑️ 修复启动时因可能的报错导致强制退出
| -rw-r--r-- | ATRI/plugins/polaroid/data_source.py | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/ATRI/plugins/polaroid/data_source.py b/ATRI/plugins/polaroid/data_source.py index a90d148..5b42e95 100644 --- a/ATRI/plugins/polaroid/data_source.py +++ b/ATRI/plugins/polaroid/data_source.py @@ -46,13 +46,13 @@ async def init_source():              log.warning("插件 polaroid 缺少所需资源,装载中")              url = SOURCE_URL + i -            data = await request.get(url)              try: +                data = await request.get(url)                  with open(path, "wb") as w:                      w.write(data.read())                  log.info("所需资源装载完成")              except Exception: -                raise WriteFileError("装载资源失败") +                log.error("装载资源失败")  driver().on_startup(init_source) | 
