From 95bc1536b23a17637188108a581a1b47bdd23daa Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Wed, 10 Oct 2018 00:51:08 +0300 Subject: show streamer version --- kvmd/server.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'kvmd/server.py') diff --git a/kvmd/server.py b/kvmd/server.py index f0dd7aed..d48191ab 100644 --- a/kvmd/server.py +++ b/kvmd/server.py @@ -1,8 +1,6 @@ import os import signal import asyncio -import platform -import functools import json import time @@ -33,17 +31,6 @@ from .logging import get_logger __version__ = "0.78" -@functools.lru_cache() -def _get_system_info() -> Dict[str, Dict[str, str]]: - return { - "version": { - "platform": platform.platform(), - "python": platform.python_version(), - "kvmd": __version__, - }, - } - - # ===== def _system_task(method: Callable) -> Callable: async def wrap(self: "Server") -> None: @@ -170,7 +157,13 @@ class Server: # pylint: disable=too-many-instance-attributes # ===== INFO async def __info_handler(self, _: aiohttp.web.Request) -> aiohttp.web.Response: - return _json(_get_system_info()) + return _json({ + "version": { + "kvmd": __version__, + "streamer": await self.__streamer.get_version(), + }, + "streamer": self.__streamer.get_app(), + }) # ===== WEBSOCKET -- cgit v1.2.3