Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
PAPI: Add MACAddress object wrapper for vl_api_mac_address_t
[vpp.git]
/
src
/
vpp-api
/
python
/
vpp_papi
/
vpp_serializer.py
diff --git
a/src/vpp-api/python/vpp_papi/vpp_serializer.py
b/src/vpp-api/python/vpp_papi/vpp_serializer.py
index
418c024
..
d62e3a4
100644
(file)
--- a/
src/vpp-api/python/vpp_papi/vpp_serializer.py
+++ b/
src/vpp-api/python/vpp_papi/vpp_serializer.py
@@
-30,9
+30,10
@@
import socket
logger = logging.getLogger(__name__)
if sys.version[0] == '2':
logger = logging.getLogger(__name__)
if sys.version[0] == '2':
-
check = lambda d
: type(d) is dict
+
def check(d)
: type(d) is dict
else:
else:
- check = lambda d: type(d) is dict or type(d) is bytes
+ def check(d): type(d) is dict or type(d) is bytes
+
def conversion_required(data, field_type):
if check(data):
def conversion_required(data, field_type):
if check(data):
@@
-101,7
+102,7
@@
class String(object):
return b'', 0
p = BaseTypes('u8', length)
x, size = p.unpack(data, offset + length_field_size)
return b'', 0
p = BaseTypes('u8', length)
x, size = p.unpack(data, offset + length_field_size)
- x2 = x.split(b'\0',1)[0]
+ x2 = x.split(b'\0',
1)[0]
return (x2.decode('utf8'), size + length_field_size)
return (x2.decode('utf8'), size + length_field_size)