diff --git a/src/plugin/error/__init__.py b/src/plugin/error/__init__.py new file mode 100644 index 0000000..47e6a89 --- /dev/null +++ b/src/plugin/error/__init__.py @@ -0,0 +1,15 @@ +import inspect, pkgutil + +__all__ = [] + +for loader, module_name, is_pkg in pkgutil.walk_packages(__path__): + module = loader.find_module(module_name).load_module(module_name) + if hasattr(module, '__all__'): + for target in getattr(module, '__all__'): + globals()[target] = getattr(module, target) + __all__.append(target) + else: + for name, object in inspect.getmembers(module): + if inspect.isclass(object) or inspect.isfunction(object): + globals()[name] = object + __all__.append(name) diff --git a/src/plugin/error/custom.py b/src/plugin/error/custom.py new file mode 100644 index 0000000..fb77883 --- /dev/null +++ b/src/plugin/error/custom.py @@ -0,0 +1,4 @@ +from spaceone.core.error import ERROR_BASE + +class ERROR_VULNERABLE_PORTS(ERROR_BASE): + _message = 'Vulnerable port option settings are incorrect. : {vulnerable_ports}' \ No newline at end of file