Metaclass Python 3.x Compatibility

According to the OpenStack style guide
(http://docs.openstack.org/developer/hacking/),
for Python 3.x compatibility use "six.add_metaclass"
instead of " __metaclass__."

Closes-Bug: #1236648
Change-Id: I2f507a90ee08cc05bd764549002a4656c187b6fc
This commit is contained in:
Steven Gonzales 2014-05-12 07:51:13 -07:00
parent 9cacd97cae
commit 0346f839a9

View File

@ -20,6 +20,7 @@ import requests
import netaddr
from oslo.config import cfg
import six
from neutron.common import exceptions
from neutron.common import rpc as n_rpc
@ -172,6 +173,7 @@ class CiscoCsrIPsecVpnDriverApi(proxy.RpcProxy):
topic=self.topic)
@six.add_metaclass(abc.ABCMeta)
class CiscoCsrIPsecDriver(device_drivers.DeviceDriver):
"""Cisco CSR VPN Device Driver for IPSec.
@ -185,7 +187,6 @@ class CiscoCsrIPsecDriver(device_drivers.DeviceDriver):
# 1.0 Initial version
RPC_API_VERSION = '1.0'
__metaclass__ = abc.ABCMeta
def __init__(self, agent, host):
self.host = host