aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/plugins/srv6-mobile/extra/runner.py2
-rw-r--r--src/plugins/vrrp/test/test_vrrp.py9
-rwxr-xr-xsrc/tools/vppapigen/vppapigen.py2
3 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/srv6-mobile/extra/runner.py b/src/plugins/srv6-mobile/extra/runner.py
index c438fb161b7..b18fdc32766 100755
--- a/src/plugins/srv6-mobile/extra/runner.py
+++ b/src/plugins/srv6-mobile/extra/runner.py
@@ -248,6 +248,7 @@ class Containers(object):
def build(self, path, vpp_path):
env = Environment(loader=FileSystemLoader(path),
+ autoescape=True,
trim_blocks=True)
self.tmp_render(join(vpp_path, "Dockerfile"),
@@ -264,6 +265,7 @@ class Containers(object):
def release(self, path, vpp_path):
env = Environment(loader=FileSystemLoader(path),
+ autoescape=True,
trim_blocks=True)
self.tmp_render(join(vpp_path, "Dockerfile"),
diff --git a/src/plugins/vrrp/test/test_vrrp.py b/src/plugins/vrrp/test/test_vrrp.py
index cd2aeb10ec3..3a85d2e6b66 100644
--- a/src/plugins/vrrp/test/test_vrrp.py
+++ b/src/plugins/vrrp/test/test_vrrp.py
@@ -8,12 +8,13 @@
import unittest
import time
-from socket import inet_pton, inet_ntop, AF_INET6
+import socket
+from socket import inet_pton, inet_ntop
from vpp_object import VppObject
from vpp_papi import VppEnum
-from scapy.packet import Raw
+from scapy.packet import raw
from scapy.layers.l2 import Ether, ARP
from scapy.layers.inet import IP, ICMP, icmptypes
from scapy.layers.inet6 import IPv6, ipv6nh, IPv6ExtHdrHopByHop, \
@@ -833,8 +834,8 @@ class TestVRRP6(VppTestCase):
self.assertEqual(pkt[IPv6].dst, "ff02::1")
# convert addrs to packed format since string versions could differ
- src_addr = inet_pton(AF_INET6, pkt[IPv6].src)
- vr_ll_addr = inet_pton(AF_INET6, vr.interface().local_ip6_ll)
+ src_addr = inet_pton(socket.AF_INET6, pkt[IPv6].src)
+ vr_ll_addr = inet_pton(socket.AF_INET6, vr.interface().local_ip6_ll)
self.assertEqual(src_addr, vr_ll_addr)
self.assertTrue(pkt[ICMPv6ND_NA].tgt in vr.virtual_ips())
diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py
index f3013aa6021..b17ad6d15c9 100755
--- a/src/tools/vppapigen/vppapigen.py
+++ b/src/tools/vppapigen/vppapigen.py
@@ -648,7 +648,7 @@ class VPPAPIParser(object):
elif len(p) == 4:
p[0] = Field(p[1], p[2])
else:
- self._parse_error('ERROR')
+ self._parse_error('ERROR', self._token_coord(p, 1))
self.fields.append(p[2])
def p_declaration_array_vla(self, p):