From 3bce8ebfdfaf2a4b576012beb3516d1f4030c20c Mon Sep 17 00:00:00 2001 From: Paul Vinciguerra Date: Sat, 24 Nov 2018 21:46:05 -0800 Subject: VPP-1508 Python3 abstract classes Update the syntax to support abstract classes in python 2 and python 3. Depends on: new style classes -- https://gerrit.fd.io/r/16166 Change-Id: Iad2c1240149f38b3faca1b37ab95d3d210e1daee Signed-off-by: Paul Vinciguerra --- test/test_lisp.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/test_lisp.py') diff --git a/test/test_lisp.py b/test/test_lisp.py index b6272dcb1bd..f66fcf79bc0 100644 --- a/test/test_lisp.py +++ b/test/test_lisp.py @@ -1,4 +1,7 @@ #!/usr/bin/env python + +import abc +import six import unittest from scapy.fields import BitField, ByteField, FlagsField, IntField @@ -28,6 +31,7 @@ bind_layers(LISP_GPE_Header, IPv6, next_proto=2) bind_layers(LISP_GPE_Header, Ether, next_proto=3) +@six.add_metaclass(abc.ABCMeta) class Driver(object): config_order = ['locator-sets', @@ -61,7 +65,7 @@ class Driver(object): Raw(payload)) return packet - @abstractmethod + @abc.abstractmethod def run(self): """ testing procedure """ pass -- cgit 1.2.3-korg