Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/plugin/error/__init__.py
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 4 additions & 0 deletions src/plugin/error/custom.py
Original file line number Diff line number Diff line change
@@ -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}'
Loading