Skip to content
Snippets Groups Projects
Commit c93454be authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Avoid crash in case of invalid binary data

parent b7746e68
No related branches found
No related tags found
No related merge requests found
......@@ -121,7 +121,12 @@ class PMTRates(kp.Module):
plt.close('all')
def process(self, blob):
tmch_data = TMCHData(io.BytesIO(blob['CHData']))
try:
tmch_data = TMCHData(io.BytesIO(blob['CHData']))
except ValueError:
self.log.error("Could not parse binary data. Ignoring...")
return blob
dom_id = tmch_data.dom_id
if dom_id not in self.detector.doms:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment