Using six.add_metaclass
Using six.add_metaclass instead of '__metaclass__' for Python 3.x compatibility. Change-Id: I04848196c8bc553fec19dd447a8fdd6dacdf64b8
This commit is contained in:
parent
1657f4e64f
commit
069ee2aed2
@ -19,6 +19,8 @@ Pluggable Weighing support
|
||||
|
||||
import abc
|
||||
|
||||
import six
|
||||
|
||||
from nova import loadables
|
||||
|
||||
|
||||
@ -61,6 +63,7 @@ class WeighedObject(object):
|
||||
return "<WeighedObject '%s': %s>" % (self.obj, self.weight)
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class BaseWeigher(object):
|
||||
"""Base class for pluggable weighers.
|
||||
|
||||
@ -70,8 +73,6 @@ class BaseWeigher(object):
|
||||
from the calculated weights.
|
||||
"""
|
||||
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
minval = None
|
||||
maxval = None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user