File tree 4 files changed +9
-6
lines changed 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -55,24 +55,27 @@ def showname_key(self):
55
55
@property
56
56
def binary_value (self ):
57
57
"""
58
- Returns the raw value of this field (as a binary string)
58
+ Converts this field to binary (assuming it's a binary string)
59
59
"""
60
60
return binascii .unhexlify (self .raw_value )
61
61
62
62
@property
63
63
def int_value (self ):
64
64
"""
65
- Returns the raw value of this field (as an integer).
65
+ Returns the int value of this field (assuming it's an integer integer).
66
66
"""
67
67
return int (self .raw_value )
68
68
69
69
@property
70
70
def hex_value (self ):
71
71
"""
72
- Returns the raw value of this field (as an integer in base 16).
72
+ Returns the int value of this field if it's in base 16 (either as a normal number or in
73
+ a "0xFFFF"-style hex value)
73
74
"""
74
75
return int (self .raw_value , 16 )
75
76
77
+ base16_value = hex_value
78
+
76
79
77
80
class LayerFieldsContainer (str , Pickleable ):
78
81
"""
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ def __getattr__(self, item):
107
107
for layer in self .layers :
108
108
if layer .layer_name == item :
109
109
return layer
110
- raise AttributeError ()
110
+ raise AttributeError ("No attribute named %s" % item )
111
111
112
112
@property
113
113
def highest_layer (self ):
Original file line number Diff line number Diff line change 5
5
6
6
7
7
def duplicate_object_hook (ordered_pairs ):
8
- """Warn on duplicate keys."""
8
+ """Make lists out of duplicate keys."""
9
9
json_dict = {}
10
10
for key , val in ordered_pairs :
11
11
existing_val = json_dict .get (key )
Original file line number Diff line number Diff line change 6
6
7
7
setup (
8
8
name = "pyshark" ,
9
- version = "0.3.7.1 " ,
9
+ version = "0.3.7.2 " ,
10
10
packages = find_packages (),
11
11
package_data = {'' : ['*.ini' , '*.pcapng' ]},
12
12
# Temporarily using trollis 1.0.4 until issue https://github.com/haypo/trollius/issues/4 is resolved.
You can’t perform that action at this time.
0 commit comments