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 <pvinci@vinciconsulting.com>
diff --git a/test/test_lisp.py b/test/test_lisp.py
index b6272dc..f66fcf7 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, Ether, next_proto=3)
+@six.add_metaclass(abc.ABCMeta)
class Driver(object):
config_order = ['locator-sets',
@@ -61,7 +65,7 @@
Raw(payload))
return packet
- @abstractmethod
+ @abc.abstractmethod
def run(self):
""" testing procedure """
pass