From b82545f77a257db60ac370e4128d2931f98058f6 Mon Sep 17 00:00:00 2001
From: Marko Mecina <marko.mecina@univie.ac.at>
Date: Wed, 6 Mar 2024 23:12:48 +0100
Subject: [PATCH] update error message

---
 Ccs/ccs_function_lib.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/Ccs/ccs_function_lib.py b/Ccs/ccs_function_lib.py
index de677d6..d54f895 100644
--- a/Ccs/ccs_function_lib.py
+++ b/Ccs/ccs_function_lib.py
@@ -1104,12 +1104,6 @@ def read_stream(stream, fmt, pos=None, offbi=0):
             x = x.decode('utf-8', errors='replace')
     elif fmt == timepack[0]:
         x = timecal(data)
-    elif fmt.startswith('CUC'):
-        logger.error('Undefined time format {}, project time format is {}'.format(fmt, timepack[0]))
-        # x = int.from_bytes(data, 'big')
-        # only interpret 4 MSBs as coarse time
-        # x = x >> ((len(data) - 4) * 8)
-        x = 0xFFFFFFFF
     else:
         x = struct.unpack('>' + fmt, data)[0]
 
@@ -1144,7 +1138,7 @@ def csize(fmt, offbi=0, bitsize=False):
         try:
             return struct.calcsize(fmt)
         except struct.error:
-            raise NotImplementedError(fmt)
+            raise NotImplementedError('Unknown format {}'.format(fmt))
 
 
 ##
-- 
GitLab