summaryrefslogtreecommitdiff
path: root/kvmd/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/plugins')
-rw-r--r--kvmd/plugins/__init__.py4
-rw-r--r--kvmd/plugins/auth/http.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/kvmd/plugins/__init__.py b/kvmd/plugins/__init__.py
index d91cc2c8..a434b121 100644
--- a/kvmd/plugins/__init__.py
+++ b/kvmd/plugins/__init__.py
@@ -53,7 +53,7 @@ class BasePlugin:
@functools.lru_cache()
def get_plugin_class(sub: str, name: str) -> Type[BasePlugin]:
try:
- module = importlib.import_module("kvmd.plugins.{}.{}".format(sub, name))
+ module = importlib.import_module(f"kvmd.plugins.{sub}.{name}")
except ModuleNotFoundError:
- raise UnknownPluginError("Unknown plugin '%s/%s'" % (sub, name))
+ raise UnknownPluginError(f"Unknown plugin '{sub}/{name}'")
return getattr(module, "Plugin")
diff --git a/kvmd/plugins/auth/http.py b/kvmd/plugins/auth/http.py
index bc391d79..69670b23 100644
--- a/kvmd/plugins/auth/http.py
+++ b/kvmd/plugins/auth/http.py
@@ -81,7 +81,7 @@ class Plugin(BaseAuthService):
"passwd": passwd
},
headers={
- "User-Agent": "KVMD/%s" % (__version__),
+ "User-Agent": f"KVMD/{__version__}",
"X-KVMD-User": user,
},
) as response: