You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, bots check their requirements only during startup. It would be helpful, if the check() method of bots does it as well, so we'll get the clear information when verifying IntelMQ installation. Probably it would be also useful to have a helper that gets the modules and versions, and can be then reused.
Pseudo-code idea:
# importing with fallback to None as usualtry:
importrequestsexceptImportError:
requests=Nonefromintelmq.lib.utilsimportDependencyValidatordeps=DependencyValidator()
deps.register(module=requests, version=(1, 1, 1), validator=lambdamodule, version: module.__version__>=version)
# ^ validator only optional when the package has some non-standard version check or so# ... in init()deps.validate(raise=True)
# ... in check()errors.extend(deps.validate(raise=False))
Maybe it would be even possible to do a method for dependency auto-discovery from corresponding REQUIREMENTS.txt file - but this could be tricky.
The text was updated successfully, but these errors were encountered:
Currently, bots check their requirements only during startup. It would be helpful, if the
check()
method of bots does it as well, so we'll get the clear information when verifying IntelMQ installation. Probably it would be also useful to have a helper that gets the modules and versions, and can be then reused.Pseudo-code idea:
Maybe it would be even possible to do a method for dependency auto-discovery from corresponding
REQUIREMENTS.txt
file - but this could be tricky.The text was updated successfully, but these errors were encountered: