nonebot-plugin-shiro-web-console 0.1.5__tar.gz → 0.1.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of nonebot-plugin-shiro-web-console might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nonebot-plugin-shiro-web-console
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: 一个用于 NoneBot2 的网页控制台插件,支持通过浏览器查看日志和发送消息
5
5
  Project-URL: Homepage, https://github.com/luojisama/nonebot-plugin-shiro-web-console
6
6
  Project-URL: Bug Tracker, https://github.com/luojisama/nonebot-plugin-shiro-web-console/issues
@@ -31,7 +31,7 @@ __plugin_meta__ = PluginMetadata(
31
31
  supported_adapters={"~onebot.v11"},
32
32
  extra={
33
33
  "author": "luojisama",
34
- "version": "0.1.5",
34
+ "version": "0.1.6",
35
35
  "pypi_test": "nonebot-plugin-shiro-web-console",
36
36
  },
37
37
  )
@@ -126,8 +126,11 @@ async def check_auth(request: Request):
126
126
  return True
127
127
 
128
128
  try:
129
- app: FastAPI = get_app()
130
- except ValueError:
129
+ app: Optional[FastAPI] = get_app()
130
+ except (ValueError, AssertionError):
131
+ app = None
132
+
133
+ if app is None:
131
134
  app = FastAPI()
132
135
  logger.warning("FastAPI app not found, created a new one. This might happen during plugin test.")
133
136
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nonebot-plugin-shiro-web-console"
3
- version = "0.1.5"
3
+ version = "0.1.6"
4
4
  description = "一个用于 NoneBot2 的网页控制台插件,支持通过浏览器查看日志和发送消息"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.9"