fix: 修复 Windows 上 resource 模块导入错误
This commit is contained in:
1 parent
623e550e84
commit
d819502b00
2 files changed
+7
-8
No files matched your search
@@ -10,14 +10,9 @@ from colorama import Fore, Style
|
||||
from .config import logger
|
||||
from .sandbox import (
|
||||
_sandbox_checker, _make_sandbox_worker, _sandbox_work_dir,
|
||||
_HAS_RESOURCE, _SAFE_WHITELIST,
|
||||
_HAS_RESOURCE, _SAFE_WHITELIST, _resource_mod,
|
||||
)
|
||||
|
||||
try:
|
||||
import resource as _resource_mod
|
||||
except ImportError:
|
||||
_resource_mod = None
|
||||
|
||||
|
||||
class CodeExecMixin:
|
||||
"""代码沙箱执行相关方法"""
|
||||
|
||||
Reference in new issue
Block a user