Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
22b5be0
)
fixes python3 TypeError; python2 intact
05/11705/2
author
Andrey "Zed" Zaikin
<zed.0xff@gmail.com>
Thu, 12 Apr 2018 09:14:02 +0000
(12:14 +0300)
committer
Damjan Marion
<dmarion.lists@gmail.com>
Thu, 12 Apr 2018 11:04:57 +0000
(11:04 +0000)
exception in vpp_api.vac_write():
"TypeError: initializer for ctype 'char *' must be a bytes or list or
tuple, not str"
Change-Id: Ib6bcfb86e6e36c557174979a110113af689c6754
Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
src/vpp-api/python/vpp_papi.py
patch
|
blob
|
history
diff --git
a/src/vpp-api/python/vpp_papi.py
b/src/vpp-api/python/vpp_papi.py
index
35edd49
..
5fa82a3
100644
(file)
--- a/
src/vpp-api/python/vpp_papi.py
+++ b/
src/vpp-api/python/vpp_papi.py
@@
-639,7
+639,7
@@
class VPP():
"""Send a binary-packed message to VPP."""
if not self.connected:
raise IOError(1, 'Not connected')
- return vpp_api.vac_write(
str
(buf), len(buf))
+ return vpp_api.vac_write(
bytes
(buf), len(buf))
def _read(self):
if not self.connected: