Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
VPP-1508 Python3 abstract classes
[vpp.git]
/
test
/
vpp_interface.py
diff --git
a/test/vpp_interface.py
b/test/vpp_interface.py
index
58384d2
..
2dcf149
100644
(file)
--- a/
test/vpp_interface.py
+++ b/
test/vpp_interface.py
@@
-1,16
+1,17
@@
import binascii
import socket
import binascii
import socket
-from abc import abstractmethod, ABCMeta
+import abc
+import six
from six import moves
from util import Host, mk_ll_addr
from vpp_papi import mac_ntop
from six import moves
from util import Host, mk_ll_addr
from vpp_papi import mac_ntop
+@six.add_metaclass(abc.ABCMeta)
class VppInterface(object):
"""Generic VPP interface."""
class VppInterface(object):
"""Generic VPP interface."""
- __metaclass__ = ABCMeta
@property
def sw_if_index(self):
@property
def sw_if_index(self):
@@
-181,7
+182,7
@@
class VppInterface(object):
self._hosts_by_ip4[ip4] = host
self._hosts_by_ip6[ip6] = host
self._hosts_by_ip4[ip4] = host
self._hosts_by_ip6[ip6] = host
- @abstractmethod
+ @ab
c.ab
stractmethod
def __init__(self, test):
self._test = test
def __init__(self, test):
self._test = test