summaryrefslogtreecommitdiff
path: root/kvmd/clients
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-01-23 07:00:49 +0300
committerDevaev Maxim <[email protected]>2021-01-23 07:00:49 +0300
commit4d4fb69d2eb2e9b3d677b82098d888bd899c8c33 (patch)
treec193f2a0db5fb34f5f58bd96d6ccd771177b1753 /kvmd/clients
parentebe40697a5935d5d35a36d0825715ca8c3824c6a (diff)
refactoring
Diffstat (limited to 'kvmd/clients')
-rw-r--r--kvmd/clients/streamer.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/kvmd/clients/streamer.py b/kvmd/clients/streamer.py
index a955b407..ea08500e 100644
--- a/kvmd/clients/streamer.py
+++ b/kvmd/clients/streamer.py
@@ -33,6 +33,7 @@ try:
except ImportError:
ustreamer = None
+from .. import tools
from .. import aiotools
from .. import htclient
@@ -119,7 +120,7 @@ class StreamerHttpClient(BaseStreamerClient):
except Exception as err: # Тут бывают и ассерты, и KeyError, и прочая херня
if isinstance(err, StreamerTempError):
raise
- raise StreamerTempError(f"{type(err).__name__}: {err}")
+ raise StreamerTempError(tools.efmt(err))
raise StreamerTempError("Reached EOF")
def __make_http_session(self) -> aiohttp.ClientSession:
@@ -165,6 +166,6 @@ class StreamerMemsinkClient(BaseStreamerClient):
if frame is not None:
yield (frame["online"], frame["width"], frame["height"], frame["data"])
except FileNotFoundError as err:
- raise StreamerTempError(f"{type(err).__name__}: {err}")
+ raise StreamerTempError(tools.efmt(err))
except Exception as err:
- raise StreamerPermError(f"{type(err).__name__}: {err}")
+ raise StreamerPermError(tools.efmt(err))