littles changes

This commit is contained in:
Bastian Schroll 2018-01-14 23:21:22 +01:00
parent c2a09ad7c3
commit 3c2aa557fe
2 changed files with 16 additions and 4 deletions

View file

@ -34,7 +34,11 @@ class Packet:
self._packet = {"timestamp": time.time()}
else:
logging.debug("create bwPacket from string")
self._packet = eval(bwPacket)
try:
self._packet = eval(bwPacket.strip())
except:
# todo can we repair teh packet anyway?
logging.exception("error while create packet from string")
def __str__(self):
"""!Return the intern _packet dict as string"""