diff options
author | Devaev Maxim <[email protected]> | 2019-10-24 02:42:19 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-10-24 02:42:19 +0300 |
commit | 096064cfbc2428a7e276ff5b5c09ecdd0badbb35 (patch) | |
tree | 218e338990ee9a939c246eb6f4a873ac93d55fef /kvmd/plugins | |
parent | 97e2d9128c37805ba649807f5f923d1d1e92907f (diff) |
changed some defaults
Diffstat (limited to 'kvmd/plugins')
-rw-r--r-- | kvmd/plugins/__init__.py | 2 | ||||
-rw-r--r-- | kvmd/plugins/atx/__init__.py | 2 | ||||
-rw-r--r-- | kvmd/plugins/msd/__init__.py | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/kvmd/plugins/__init__.py b/kvmd/plugins/__init__.py index cdd683ff..ebdeaf0b 100644 --- a/kvmd/plugins/__init__.py +++ b/kvmd/plugins/__init__.py @@ -50,6 +50,8 @@ class BasePlugin: @functools.lru_cache() def get_plugin_class(sub: str, name: str) -> Type[BasePlugin]: + assert sub + assert name try: module = importlib.import_module(f"kvmd.plugins.{sub}.{name}") except ModuleNotFoundError: diff --git a/kvmd/plugins/atx/__init__.py b/kvmd/plugins/atx/__init__.py index f05cef78..a593929e 100644 --- a/kvmd/plugins/atx/__init__.py +++ b/kvmd/plugins/atx/__init__.py @@ -82,4 +82,4 @@ class BaseAtx(BasePlugin): # ===== def get_atx_class(name: str) -> Type[BaseAtx]: - return get_plugin_class("atx", (name or "disabled")) # type: ignore + return get_plugin_class("atx", name) # type: ignore diff --git a/kvmd/plugins/msd/__init__.py b/kvmd/plugins/msd/__init__.py index dc6fbd51..899b6f47 100644 --- a/kvmd/plugins/msd/__init__.py +++ b/kvmd/plugins/msd/__init__.py @@ -119,4 +119,4 @@ class BaseMsd(BasePlugin): # ===== def get_msd_class(name: str) -> Type[BaseMsd]: - return get_plugin_class("msd", (name or "disabled")) # type: ignore + return get_plugin_class("msd", name) # type: ignore |