Skip to content

Commit 61f1f15

Browse files
fix: fix error directory path
1 parent 953611f commit 61f1f15

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/plugin/error/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import inspect, pkgutil
2+
3+
__all__ = []
4+
5+
for loader, module_name, is_pkg in pkgutil.walk_packages(__path__):
6+
module = loader.find_module(module_name).load_module(module_name)
7+
if hasattr(module, '__all__'):
8+
for target in getattr(module, '__all__'):
9+
globals()[target] = getattr(module, target)
10+
__all__.append(target)
11+
else:
12+
for name, object in inspect.getmembers(module):
13+
if inspect.isclass(object) or inspect.isfunction(object):
14+
globals()[name] = object
15+
__all__.append(name)

src/plugin/error/custom.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from spaceone.core.error import ERROR_BASE
2+
3+
class ERROR_VULNERABLE_PORTS(ERROR_BASE):
4+
_message = 'Vulnerable port option settings are incorrect. : {vulnerable_ports}'

0 commit comments

Comments
 (0)