From 9b6533bbc021854deb3528fd52129b336169b483 Mon Sep 17 00:00:00 2001 From: fujioka yuuichi Date: Thu, 17 Oct 2013 09:41:01 +0900 Subject: [PATCH] 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: I08703a8b2927f45f4705fe085368d1ebd78b02fa Closes-Bug: #1236648 --- keystoneclient/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keystoneclient/base.py b/keystoneclient/base.py index 62d96f143..529e0c3da 100644 --- a/keystoneclient/base.py +++ b/keystoneclient/base.py @@ -216,11 +216,10 @@ class Manager(object): return self.resource_class(self, body[response_key]) +@six.add_metaclass(abc.ABCMeta) class ManagerWithFind(Manager): """Manager with additional `find()`/`findall()` methods.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def list(self): pass