Skip to content

Commit e1b1221

Browse files
committed
New distribution [0.13.3]
- fixed minor bugs in const for number literal incompatibility with Python 3.5
1 parent 913b5c1 commit e1b1221

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

release

Submodule release updated from 7df647e to f4c69b9

src/const/http/error_code.py

+15-15
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ class ErrorCode(IntEnum):
99
ErrorCode = vars()
1010

1111
# HTTP/2 Error Code
12-
ErrorCode['NO_ERROR'] = 0x0000_0000 # [RFC 7540, Section 7] Graceful shutdown
13-
ErrorCode['PROTOCOL_ERROR'] = 0x0000_0001 # [RFC 7540, Section 7] Protocol error detected
14-
ErrorCode['INTERNAL_ERROR'] = 0x0000_0002 # [RFC 7540, Section 7] Implementation fault
15-
ErrorCode['FLOW_CONTROL_ERROR'] = 0x0000_0003 # [RFC 7540, Section 7] Flow-control limits exceeded
16-
ErrorCode['SETTINGS_TIMEOUT'] = 0x0000_0004 # [RFC 7540, Section 7] Settings not acknowledged
17-
ErrorCode['STREAM_CLOSED'] = 0x0000_0005 # [RFC 7540, Section 7] Frame received for closed stream
18-
ErrorCode['FRAME_SIZE_ERROR'] = 0x0000_0006 # [RFC 7540, Section 7] Frame size incorrect
19-
ErrorCode['REFUSED_STREAM'] = 0x0000_0007 # [RFC 7540, Section 7] Stream not processed
20-
ErrorCode['CANCEL'] = 0x0000_0008 # [RFC 7540, Section 7] Stream cancelled
21-
ErrorCode['COMPRESSION_ERROR'] = 0x0000_0009 # [RFC 7540, Section 7] Compression state not updated
22-
ErrorCode['CONNECT_ERROR'] = 0x0000_000A # [RFC 7540, Section 7] TCP connection error for CONNECT method
23-
ErrorCode['ENHANCE_YOUR_CALM'] = 0x0000_000B # [RFC 7540, Section 7] Processing capacity exceeded
24-
ErrorCode['INADEQUATE_SECURITY'] = 0x0000_000C # [RFC 7540, Section 7] Negotiated TLS parameters not acceptable
25-
ErrorCode['HTTP_1_1_REQUIRED'] = 0x0000_000D # [RFC 7540, Section 7] Use HTTP/1.1 for the request
12+
ErrorCode['NO_ERROR'] = 0x00000000 # [RFC 7540, Section 7] Graceful shutdown
13+
ErrorCode['PROTOCOL_ERROR'] = 0x00000001 # [RFC 7540, Section 7] Protocol error detected
14+
ErrorCode['INTERNAL_ERROR'] = 0x00000002 # [RFC 7540, Section 7] Implementation fault
15+
ErrorCode['FLOW_CONTROL_ERROR'] = 0x00000003 # [RFC 7540, Section 7] Flow-control limits exceeded
16+
ErrorCode['SETTINGS_TIMEOUT'] = 0x00000004 # [RFC 7540, Section 7] Settings not acknowledged
17+
ErrorCode['STREAM_CLOSED'] = 0x00000005 # [RFC 7540, Section 7] Frame received for closed stream
18+
ErrorCode['FRAME_SIZE_ERROR'] = 0x00000006 # [RFC 7540, Section 7] Frame size incorrect
19+
ErrorCode['REFUSED_STREAM'] = 0x00000007 # [RFC 7540, Section 7] Stream not processed
20+
ErrorCode['CANCEL'] = 0x00000008 # [RFC 7540, Section 7] Stream cancelled
21+
ErrorCode['COMPRESSION_ERROR'] = 0x00000009 # [RFC 7540, Section 7] Compression state not updated
22+
ErrorCode['CONNECT_ERROR'] = 0x0000000A # [RFC 7540, Section 7] TCP connection error for CONNECT method
23+
ErrorCode['ENHANCE_YOUR_CALM'] = 0x0000000B # [RFC 7540, Section 7] Processing capacity exceeded
24+
ErrorCode['INADEQUATE_SECURITY'] = 0x0000000C # [RFC 7540, Section 7] Negotiated TLS parameters not acceptable
25+
ErrorCode['HTTP_1_1_REQUIRED'] = 0x0000000D # [RFC 7540, Section 7] Use HTTP/1.1 for the request
2626

2727
@staticmethod
2828
def get(key, default=-1):
@@ -38,7 +38,7 @@ def _missing_(cls, value):
3838
"""Lookup function used when value is not found."""
3939
if not (isinstance(value, int) and 0x0000_0000 <= value <= 0xFFFF_FFFF):
4040
raise ValueError('%r is not a valid %s' % (value, cls.__name__))
41-
if 0x0000_000E <= value <= 0xFFFF_FFFF:
41+
if 0x0000000E <= value <= 0xFFFFFFFF:
4242
temp = hex(value)[2:].upper().zfill(8)
4343
extend_enum(cls, 'Unassigned [0x%s]' % (temp[:4]+'_'+temp[4:]), value)
4444
return cls(value)

src/const/misc/linktype.py

+2
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ class LinkType(IntEnum):
128128
LinkType['OPENVIZSLA'] = 278 # DLT_OPENVIZSLA
129129
LinkType['EBHSCR'] = 279 # DLT_EBHSCR
130130
LinkType['VPP_DISPATCH'] = 280 # DLT_VPP_DISPATCH
131+
LinkType['DSA_TAG_BRCM'] = 281 # DLT_DSA_TAG_BRCM
132+
LinkType['DSA_TAG_BRCM_PREPEND'] = 282 # DLT_DSA_TAG_BRCM_PREPEND
131133

132134
@staticmethod
133135
def get(key, default=-1):

testbench/rc:protocols

Submodule rc:protocols updated from 3a7590c to 449fa28

0 commit comments

Comments
 (0)