Agent: Fix incorrect return type on PluginRegistry.get_plugin()

This commit is contained in:
Mike Salvatore 2022-02-16 14:11:27 -05:00
parent 5953373125
commit 5b53984014
1 changed files with 1 additions and 2 deletions

View File

@ -1,5 +1,4 @@
import logging
from typing import Optional
from infection_monkey.i_puppet import PluginType, UnknownPluginError
@ -28,7 +27,7 @@ class PluginRegistry:
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:
plugin = self._registry[plugin_type][plugin_name]
except KeyError: