pypcapkit 1.3.1.post28__pp310-none-any.whl → 1.3.3.post1__pp310-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 +1 -1
- pcapkit/__main__.py +2 -2
- pcapkit/utilities/decorators.py +1 -4
- pcapkit/utilities/exceptions.py +5 -5
- {pypcapkit-1.3.1.post28.dist-info → pypcapkit-1.3.3.post1.dist-info}/METADATA +1 -1
- {pypcapkit-1.3.1.post28.dist-info → pypcapkit-1.3.3.post1.dist-info}/RECORD +10 -10
- {pypcapkit-1.3.1.post28.dist-info → pypcapkit-1.3.3.post1.dist-info}/WHEEL +1 -1
- {pypcapkit-1.3.1.post28.dist-info → pypcapkit-1.3.3.post1.dist-info}/LICENSE +0 -0
- {pypcapkit-1.3.1.post28.dist-info → pypcapkit-1.3.3.post1.dist-info}/entry_points.txt +0 -0
- {pypcapkit-1.3.1.post28.dist-info → pypcapkit-1.3.3.post1.dist-info}/top_level.txt +0 -0
pcapkit/__init__.py
CHANGED
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
|
pcapkit/utilities/decorators.py
CHANGED
@@ -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.
|
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))
|
pcapkit/utilities/exceptions.py
CHANGED
@@ -101,16 +101,16 @@ class BaseError(Exception):
|
|
101
101
|
# log error
|
102
102
|
if not quiet:
|
103
103
|
if DEVMODE:
|
104
|
-
logger.
|
105
|
-
|
106
|
-
|
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.
|
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.
|
113
|
+
logger.error('%s: %s', type(self).__name__, str(self))
|
114
114
|
|
115
115
|
if not DEVMODE:
|
116
116
|
sys.tracebacklimit = 0
|
@@ -1,5 +1,5 @@
|
|
1
|
-
pcapkit/__init__.py,sha256=
|
2
|
-
pcapkit/__main__.py,sha256=
|
1
|
+
pcapkit/__init__.py,sha256=HD-zEtr43yYqgsWyCw8_EmqXRzISF4l4ySB8EGb98wc,4097
|
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=
|
330
|
-
pcapkit/utilities/exceptions.py,sha256=
|
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.
|
462
|
-
pypcapkit-1.3.
|
463
|
-
pypcapkit-1.3.
|
464
|
-
pypcapkit-1.3.
|
465
|
-
pypcapkit-1.3.
|
466
|
-
pypcapkit-1.3.
|
461
|
+
pypcapkit-1.3.3.post1.dist-info/LICENSE,sha256=KkKND5E2e1Z6CQvSLPc1lRBy4xPRed41AG6q1txotWk,1516
|
462
|
+
pypcapkit-1.3.3.post1.dist-info/METADATA,sha256=wApFlgF9eKzopTSGHOYkmFyDQK5DqAACKISns14Rc44,7704
|
463
|
+
pypcapkit-1.3.3.post1.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
464
|
+
pypcapkit-1.3.3.post1.dist-info/entry_points.txt,sha256=8tVaZ-N0S2t19ELoTEGq_OlC8-dSmd7dvNn-kMV3afY,100
|
465
|
+
pypcapkit-1.3.3.post1.dist-info/top_level.txt,sha256=KEssKRhG9ln3EOfGH-yi98HgI-MM9hOHy09QQP-fvk8,8
|
466
|
+
pypcapkit-1.3.3.post1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|