add plugin dep check

This commit is contained in:
Qing
2023-03-26 12:37:58 +08:00
parent 1433d21b9f
commit d938f2da3c
7 changed files with 48 additions and 14 deletions

View File

@@ -0,0 +1,15 @@
from loguru import logger
class BasePlugin:
def __init__(self):
err_msg = self.check_dep()
if err_msg:
logger.error(err_msg)
exit(-1)
def __call__(self, rgb_np_img, files, form):
...
def check_dep(self):
...