更新Caller类,修复模块名称为空的情况并添加调试日志;修改run_shell_command描述并重命名

This commit is contained in:
2024-12-16 02:15:55 +08:00
parent b3c63f0ae4
commit dacb5aa854
2 changed files with 7 additions and 4 deletions

View File

@ -82,7 +82,7 @@ class Caller:
if module := inspect.getmodule(func):
module_name = module.__name__.split(".")[-1]
else:
module_name = "global"
module_name = ""
self._name = f"{module_name}-{func.__name__}"
_caller_data[self._name] = self
@ -140,6 +140,7 @@ class Caller:
"""
y, r = await self.pre_check()
if not y:
logger.debug(f"Function {self._name} pre_check failed: {r}")
return r
if self.func is None: