pypcapkit 1.3.1.post28__cp312-none-any.whl → 1.3.3__cp312-none-any.whl

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.
pcapkit/__init__.py CHANGED
@@ -123,4 +123,4 @@ __all__ = [
123
123
  ]
124
124
 
125
125
  #: version number
126
- __version__ = '1.3.1.post28'
126
+ __version__ = '1.3.3'
pcapkit/__main__.py CHANGED
@@ -120,7 +120,7 @@ def main() -> 'int':
120
120
  if args.verbose:
121
121
  try:
122
122
  print(emoji.emojize(f":police_car_light: Loading file {extractor.input!r}"))
123
- except UnicodeEncodeError:
123
+ except (UnicodeEncodeError, NameError): # may trigger if emoji not installed
124
124
  print(f"[*] Loading file {extractor.input!r}")
125
125
 
126
126
  for _ in extractor:
@@ -128,7 +128,7 @@ def main() -> 'int':
128
128
 
129
129
  try:
130
130
  print(emoji.emojize(f":beer_mug: Report file{'s' if args.files else ''} stored in {extractor.output!r}"))
131
- except UnicodeEncodeError:
131
+ except (UnicodeEncodeError, NameError): # may trigger if emoji not installed
132
132
  print(f"[*] Report file{'s' if args.files else ''} stored in {extractor.output!r}")
133
133
 
134
134
  return 0
@@ -14,7 +14,6 @@ decorators, including :func:`~pcapkit.utilities.decorators.seekset`,
14
14
  import functools
15
15
  import io
16
16
  import os
17
- import traceback
18
17
  from typing import TYPE_CHECKING, cast
19
18
 
20
19
  from pcapkit.utilities.exceptions import StructError, stacklevel
@@ -123,9 +122,7 @@ def beholder(func: 'Callable[Concatenate[Protocol, int, Optional[int], P], R_beh
123
122
  # error = traceback.format_exc(limit=1).strip().rsplit(os.linesep, maxsplit=1)[-1]
124
123
 
125
124
  # log error
126
- logger.error(str(exc), exc_info=exc, stack_info=DEVMODE, stacklevel=stacklevel())
127
- if VERBOSE:
128
- traceback.print_exc()
125
+ logger.warning(str(exc), exc_info=exc if VERBOSE else None, stack_info=DEVMODE, stacklevel=stacklevel())
129
126
 
130
127
  file_ = self.__header__.get_payload()
131
128
  next_ = protocol(file_, length, error=str(exc))
@@ -101,16 +101,16 @@ class BaseError(Exception):
101
101
  # log error
102
102
  if not quiet:
103
103
  if DEVMODE:
104
- logger.error('%s: %s', type(self).__name__, str(self),
105
- exc_info=self if VERBOSE else False,
106
- stack_info=VERBOSE, stacklevel=-stacklevel())
104
+ logger.critical('%s: %s', type(self).__name__, str(self),
105
+ exc_info=self if VERBOSE else False,
106
+ stack_info=VERBOSE, stacklevel=-stacklevel())
107
107
  else:
108
- logger.error('%s: %s', type(self).__name__, str(self))
108
+ logger.critical("%s: %s", type(self).__name__, str(self))
109
109
 
110
110
  # logger.error('%s: %s', type(self).__name__, str(self), exc_info=self,
111
111
  # stack_info=True, stacklevel=-stacklevel())
112
112
  else:
113
- logger.warning('%s: %s', type(self).__name__, str(self))
113
+ logger.error('%s: %s', type(self).__name__, str(self))
114
114
 
115
115
  if not DEVMODE:
116
116
  sys.tracebacklimit = 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pypcapkit
3
- Version: 1.3.1.post28
3
+ Version: 1.3.3
4
4
  Summary: PyPCAPKit: comprehensive network packet analysis library
5
5
  Author-email: Jarry Shaw <jarryshaw@icloud.com>
6
6
  Maintainer: Jarry Shaw
@@ -1,5 +1,5 @@
1
- pcapkit/__init__.py,sha256=6aHJGhg9HxPbaQ11FR4-r3svr4VcXi8QCjl-sQOMyjU,4098
2
- pcapkit/__main__.py,sha256=pckITFrDzzXCXPM_r03AAhvpGyqFWdwyKDkGRZENiv4,6313
1
+ pcapkit/__init__.py,sha256=5Jr8vAES7SAC2ttUsP31Qc9e9IoKIbLMTdB6y0YNPKg,4091
2
+ pcapkit/__main__.py,sha256=G3rJrhCwkxlxOa04zwRJ4mq4G1k8JYWES3JnsaeMDe4,6415
3
3
  pcapkit/all.py,sha256=6G7rVFlajYk98F5vCYcLOw-CkXdEw4C2zAwnTgU0asU,6679
4
4
  pcapkit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  pcapkit/const/__init__.py,sha256=XpEr66hXmBpBofS5aHiTZXTG8VZlxU7xy0BNXBKCi1Q,3266
@@ -326,8 +326,8 @@ pcapkit/toolkit/pyshark.py,sha256=37KdzGls8b8aI7d-MHS9k0QQbo9Gm1sRDth-eLKVToA,33
326
326
  pcapkit/toolkit/scapy.py,sha256=L-rmqDWgTjHOH_MiqcwtYXhaPm3pzGc0kh1IUzNyzkI,11445
327
327
  pcapkit/utilities/__init__.py,sha256=nd_SO3k9zXgi-Vesa1bhBiAgu55x2BeRMclLsdz9RWg,692
328
328
  pcapkit/utilities/compat.py,sha256=fq16iG0leV4cyglNn2GeXdIIwUVzwMXGtdPigrejrgo,6533
329
- pcapkit/utilities/decorators.py,sha256=qODxCY5OywT45vkQ-9tDibrtNSHJeIjF1m8_2PfDPzs,7156
330
- pcapkit/utilities/exceptions.py,sha256=LfI3XW4awaiHHYIbsHyG66r7iuJ3sL_e9B-WadwJfWM,11082
329
+ pcapkit/utilities/decorators.py,sha256=ZzWyk-l3jyEYbqpdB1YLo5YYcJs0UZ7g3vOMs7OXuzU,7101
330
+ pcapkit/utilities/exceptions.py,sha256=2T2KvTXfzfs2iGuRkbczq_0zTN9jpwhrV-_8ULikP_M,11092
331
331
  pcapkit/utilities/logging.py,sha256=-QAMfEfoWO17FwZoPHYN_2RL8tp8HlJNwbdu3eJXMfE,1935
332
332
  pcapkit/utilities/warnings.py,sha256=2b8IXVIWLHb8DBsMFdiBF87kaVp1y1ELxbHYpm2zD2s,5068
333
333
  pcapkit/vendor/__init__.py,sha256=nFCn9gu6N0JCAd2_xdParYoUfdUd9F4BhrcYD_Cq0_M,3940
@@ -458,9 +458,9 @@ pcapkit/vendor/tcp/mp_tcp_option.py,sha256=f6_-VMoQFnhuEbxs17Q1rp6JjFSLXGK3w1K2v
458
458
  pcapkit/vendor/tcp/option.py,sha256=p05DrOt2m0QCf4gjLJzRshQRvaWxmt2PIzsv2UMjsa8,3043
459
459
  pcapkit/vendor/vlan/__init__.py,sha256=qvLktJ0yuoZokas6-_ZGwMJOzbujSCM8pZHQ9jjTegU,674
460
460
  pcapkit/vendor/vlan/priority_level.py,sha256=xVu6M-Ys4pft5I-qPCCxM-KfnMAUnZppD2qPO9gPkVE,2961
461
- pypcapkit-1.3.1.post28.dist-info/LICENSE,sha256=KkKND5E2e1Z6CQvSLPc1lRBy4xPRed41AG6q1txotWk,1516
462
- pypcapkit-1.3.1.post28.dist-info/METADATA,sha256=bW0XgVALhBGoDpR4hIX9-a2lutzhsw0Y04UReZDe428,7705
463
- pypcapkit-1.3.1.post28.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
464
- pypcapkit-1.3.1.post28.dist-info/entry_points.txt,sha256=8tVaZ-N0S2t19ELoTEGq_OlC8-dSmd7dvNn-kMV3afY,100
465
- pypcapkit-1.3.1.post28.dist-info/top_level.txt,sha256=KEssKRhG9ln3EOfGH-yi98HgI-MM9hOHy09QQP-fvk8,8
466
- pypcapkit-1.3.1.post28.dist-info/RECORD,,
461
+ pypcapkit-1.3.3.dist-info/LICENSE,sha256=KkKND5E2e1Z6CQvSLPc1lRBy4xPRed41AG6q1txotWk,1516
462
+ pypcapkit-1.3.3.dist-info/METADATA,sha256=QAHLazrk1Gua8_Bcw7N2SV7vbYZ-FTtwbUybd2Od7i8,7698
463
+ pypcapkit-1.3.3.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
464
+ pypcapkit-1.3.3.dist-info/entry_points.txt,sha256=8tVaZ-N0S2t19ELoTEGq_OlC8-dSmd7dvNn-kMV3afY,100
465
+ pypcapkit-1.3.3.dist-info/top_level.txt,sha256=KEssKRhG9ln3EOfGH-yi98HgI-MM9hOHy09QQP-fvk8,8
466
+ pypcapkit-1.3.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.2.0)
2
+ Generator: setuptools (75.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5