Change __metaclass__ with optimal six.add_metaclass

Use six.add_metaclass instead of __metaclass__.[1]

[1]http://docs.openstack.org/developer/hacking/#

Change-Id: Ie75f3303ed6b124b37190feeede807a205c10e07
This commit is contained in:
gengchc2 2016-09-27 10:44:58 +08:00
parent 33c4b02e76
commit 0f89fd4421
2 changed files with 4 additions and 3 deletions

View File

@ -13,14 +13,15 @@
# under the License.
import abc
import logging
import six
from entropy import utils
LOG = logging.getLogger(__name__)
@six.add_metaclass(abc.ABCMeta)
class AuditBase(object):
__metaclass__ = abc.ABCMeta
def __init__(self, **kwargs):
utils.reset_logger(logging.getLogger())

View File

@ -13,13 +13,13 @@
# under the License.
import abc
import logging
import six
LOG = logging.getLogger(__name__)
@six.add_metaclass(abc.ABCMeta)
class RepairBase(object):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def send_message(self, **kwargs):