forked from p15670423/monkey
Agent: Fix incorrect return type on PluginRegistry.get_plugin()
This commit is contained in:
parent
5953373125
commit
5b53984014
|
@ -1,5 +1,4 @@
|
||||||
import logging
|
import logging
|
||||||
from typing import Optional
|
|
||||||
|
|
||||||
from infection_monkey.i_puppet import PluginType, UnknownPluginError
|
from infection_monkey.i_puppet import PluginType, UnknownPluginError
|
||||||
|
|
||||||
|
@ -28,7 +27,7 @@ class PluginRegistry:
|
||||||
|
|
||||||
logger.debug(f"Plugin '{plugin_name}' loaded")
|
logger.debug(f"Plugin '{plugin_name}' loaded")
|
||||||
|
|
||||||
def get_plugin(self, plugin_name: str, plugin_type: PluginType) -> Optional[object]:
|
def get_plugin(self, plugin_name: str, plugin_type: PluginType) -> object:
|
||||||
try:
|
try:
|
||||||
plugin = self._registry[plugin_type][plugin_name]
|
plugin = self._registry[plugin_type][plugin_name]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Loading…
Reference in New Issue