Apply six for metaclass
The way to using metaclass has changed in Python3. Python 2.7 way: class Foo(object): __metaclass__ = FooMeta Python 3 way: class Foo(object, metaclass=FooMeta): ... The six.add_metaclass() decorator allows us to use one syntax that works for both Python 2.7 and Python 3. Change-Id: Ibd31a9f91bac6ec220d802f16c77ee0306e211b3 Closes-Bug: #1236648
This commit is contained in:
parent
516586a6b8
commit
362cb18cb4
@ -163,13 +163,12 @@ class Manager(utils.HookableMixin):
|
||||
return self.resource_class(self, body)
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class ManagerWithFind(Manager):
|
||||
"""
|
||||
Like a `Manager`, but with additional `find()`/`findall()` methods.
|
||||
"""
|
||||
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
@abc.abstractmethod
|
||||
def list(self):
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user