From daeba3c1fb4e3e73293dbb546af686b8101bbc2a Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 11 May 2024 00:32:03 +0200 Subject: [PATCH] sysmocom_sjs2: Make sure 'Const' is imported File "/crypt/space/home/laforge/projects/git/pysim/pySim/sysmocom_sja2.py", line 180, in __init__ self._construct = Struct(Const(b'\x82'), 'time_unit'/self.TimeUnit, 'value'/Int8ub, ^^^^^ NameError: name 'Const' is not defined Change-Id: If34a48e349680ef84e68a4a1a19dde536ecda0e6 --- pySim/sysmocom_sja2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/sysmocom_sja2.py b/pySim/sysmocom_sja2.py index dd876aaa..97de5a56 100644 --- a/pySim/sysmocom_sja2.py +++ b/pySim/sysmocom_sja2.py @@ -19,7 +19,7 @@ along with this program. If not, see . from struct import unpack from construct import FlagsEnum, Byte, Struct, Int8ub, Bytes, Mapping, Enum, Padding, BitsInteger -from construct import Bit, this, Int32ub, Int16ub, Nibble, BytesInteger, GreedyRange +from construct import Bit, this, Int32ub, Int16ub, Nibble, BytesInteger, GreedyRange, Const from construct import Optional as COptional from pySim.utils import *