From 811964ac7d0b2648526042888b45b14d140686a3 Mon Sep 17 00:00:00 2001
From: Tamas Gal <himself@tamasgal.com>
Date: Tue, 10 Jan 2023 08:07:29 +0100
Subject: [PATCH] Remove debug block for overflow error

---
 backend/scripts/ztplot.py | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/backend/scripts/ztplot.py b/backend/scripts/ztplot.py
index 1cd99c8..e92d8ed 100755
--- a/backend/scripts/ztplot.py
+++ b/backend/scripts/ztplot.py
@@ -204,18 +204,7 @@ class ZTPlot(kp.Module):
             if trig_check(int(trigger_mask))
         ])
 
-        try:
-            dt = datetime.utcfromtimestamp(utc_timestamp)
-        except OverflowError:
-            self.log.critical("OverflowError encountered when converting '%s' to "
-                              "a datetime object.", utc_timestamp)
-            rawdata_filename = "/data/IO_EVT_overflowerror_{:08d}_{:08d}_FI{}_TC{}.dat".format(
-                    det_id, run_id, frame_index, trigger_counter)
-            self.log.critical("Dumping raw data to: %s and exiting.", rawdata_filename)
-            with open(rawdata_filename, "wb") as fobj:
-                fobj.write(raw_data)
-            exit(1)
-
+        dt = datetime.utcfromtimestamp(utc_timestamp)
         delta_t = (datetime.utcnow() - dt).seconds
         if abs(delta_t) > 60*5:
             self.log.warning("The timestamp-delta of the event is '%s'", delta_t)
-- 
GitLab