libasterix 0.36.0__tar.gz → 0.36.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: libasterix
3
- Version: 0.36.0
3
+ Version: 0.36.1
4
4
  Summary: Asterix data processing library
5
5
  Author-email: Zoran Bošnjak <zoran.bosnjak@via.si>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "libasterix"
3
- version = "0.36.0"
3
+ version = "0.36.1"
4
4
  authors = [
5
5
  { name="Zoran Bošnjak", email="zoran.bosnjak@via.si" },
6
6
  ]
@@ -567,7 +567,7 @@ class Spare(ItemBase):
567
567
  def _parse(cls, bs: Bits) -> Union[ValueError, Tuple['Spare', Bits]]:
568
568
  n = cls.cv_bit_size
569
569
  if len(bs) < n:
570
- return ValueError('overflow')
570
+ return ValueError('insufficient data, spare')
571
571
  a, b = bs.split_at(n)
572
572
  return (cls(a), b)
573
573
 
@@ -660,7 +660,7 @@ class Element(Variation):
660
660
  def _parse(cls, bs: Bits) -> Union[ValueError, Tuple['Element', Bits]]:
661
661
  n = cls.cv_bit_size
662
662
  if len(bs) < n:
663
- return ValueError('overflow')
663
+ return ValueError('insufficient data, element')
664
664
  a, b = bs.split_at(n)
665
665
  return (cls(a), b)
666
666
 
@@ -779,7 +779,7 @@ class Extended(Variation):
779
779
  items1.append(items2.copy())
780
780
  items2 = []
781
781
  if len(remaining) < 1:
782
- return ValueError('overflow')
782
+ return ValueError('insufficient data, extended')
783
783
  fx, remaining = remaining.head_tail()
784
784
  if not fx:
785
785
  break
@@ -904,7 +904,7 @@ class Repetitive(Variation):
904
904
  return result
905
905
  obj, remaining = result
906
906
  if len(remaining) < 1:
907
- return ValueError('overflow')
907
+ return ValueError('insufficient data, repetitive')
908
908
  fx, remaining = remaining.head_tail()
909
909
  items.append(obj)
910
910
  if not fx:
@@ -913,7 +913,7 @@ class Repetitive(Variation):
913
913
  else:
914
914
  rbs = rbs * 8
915
915
  if len(remaining) < rbs:
916
- return ValueError('overflow')
916
+ return ValueError('insufficient data, repetitive')
917
917
  (cnt, remaining) = remaining.split_at(rbs)
918
918
  for i in range(cnt.to_uinteger()):
919
919
  result = cls.cv_variation._parse(remaining)
@@ -959,12 +959,12 @@ class Explicit(Variation):
959
959
  @classmethod
960
960
  def _parse(cls, bs: Bits) -> Union[ValueError, Tuple['Explicit', Bits]]:
961
961
  if len(bs) < 8:
962
- return ValueError('overflow')
962
+ return ValueError('insufficient data, explicit size')
963
963
  cnt = bs.take(8).to_uinteger() * 8
964
964
  if cnt == 0:
965
965
  return ValueError("Unexpected size of explicit item")
966
966
  if len(bs) < cnt:
967
- return ValueError('overflow')
967
+ return ValueError('insufficient data, explicit data')
968
968
  a, b = bs.split_at(cnt)
969
969
  return (cls(a), b)
970
970
 
@@ -1015,7 +1015,7 @@ class Fspec:
1015
1015
  return ValueError('fspec too big')
1016
1016
  # 'i' contains the last byte, which must have FX=0
1017
1017
  if (i & 0x01):
1018
- return ValueError('overflow')
1018
+ return ValueError('insufficient data, fspec')
1019
1019
  (a, b) = s.split_at(n * 8)
1020
1020
  return (cls(a), b)
1021
1021
 
@@ -1299,7 +1299,7 @@ class Record:
1299
1299
  items3: List[Tuple[str, NonSpare]] = []
1300
1300
  if len(remaining) < 8:
1301
1301
  if pm == ParsingMode.StrictParsing:
1302
- return ValueError('overflow')
1302
+ return ValueError('insufficient data, rfs')
1303
1303
  else:
1304
1304
  break
1305
1305
  a, remaining = remaining.split_at(8)
@@ -1307,7 +1307,7 @@ class Record:
1307
1307
  for j in range(n):
1308
1308
  if len(remaining) < 8:
1309
1309
  if pm == ParsingMode.StrictParsing:
1310
- return ValueError('overflow')
1310
+ return ValueError('insufficient data, rfs')
1311
1311
  else:
1312
1312
  break
1313
1313
  b, remaining = remaining.split_at(8)
@@ -1575,7 +1575,7 @@ class Expansion:
1575
1575
  if a == FspecFixed:
1576
1576
  n = b * 8
1577
1577
  if len(bs) < n:
1578
- return ValueError('overflow')
1578
+ return ValueError('insufficient data, expansion')
1579
1579
  flags_bits, remaining = bs.split_at(n)
1580
1580
  flags = list(flags_bits)
1581
1581
  elif a == FspecFx:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: libasterix
3
- Version: 0.36.0
3
+ Version: 0.36.1
4
4
  Summary: Asterix data processing library
5
5
  Author-email: Zoran Bošnjak <zoran.bosnjak@via.si>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes