mirror of
https://github.com/OMGeeky/flucto-heisskleber.git
synced 2026-01-06 19:49:43 +01:00
Fix/exception verbose output only (#91)
* made the print statement of when unpacking a message fails controlled by the verbose flag * bump to 0.5.3
This commit is contained in:
@@ -16,4 +16,4 @@ __all__ = [
|
||||
"AsyncSink",
|
||||
"AsyncSource",
|
||||
]
|
||||
__version__ = "0.5.2"
|
||||
__version__ = "0.5.3"
|
||||
|
||||
@@ -103,10 +103,11 @@ class AsyncUdpSource(AsyncSource):
|
||||
data = await self.queue.get()
|
||||
try:
|
||||
payload = self.unpacker(data.decode(self.config.encoding, errors="ignore"))
|
||||
except UnicodeDecodeError:
|
||||
print(f"Could not decode data, is not {self.config.encoding}")
|
||||
# except UnicodeDecodeError: # this won't be thrown anymore, as the error flag is set to ignore!
|
||||
# print(f"Could not decode data, is not {self.config.encoding}")
|
||||
except Exception:
|
||||
print(f"Could not deserialize data: {data!r}")
|
||||
if self.config.verbose:
|
||||
print(f"Could not deserialize data: {data!r}")
|
||||
else:
|
||||
return (self.topic, payload)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "heisskleber"
|
||||
version = "0.5.2"
|
||||
version = "0.5.3"
|
||||
description = "Heisskleber"
|
||||
authors = ["Felix Weiler <felix@flucto.tech>"]
|
||||
license = "MIT"
|
||||
|
||||
Reference in New Issue
Block a user