Use six.add_metaclass instead of __metaclass__
According to http://docs.openstack.org/developer/hacking/ it should be preferred to use six.add_metaclass instead of __metaclass__. Added new requirement six >= 1.6.0. Change-Id: Ic7e4f5cb03889cc6bfdb04a657d4654b5fedc985
This commit is contained in:
parent
39d5fcdff3
commit
d6bca95537
@ -20,10 +20,11 @@ from cliff.show import ShowOne
|
||||
from designateclient import exceptions
|
||||
from designateclient import utils
|
||||
from designateclient.v1 import Client
|
||||
import six
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class Command(CliffCommand):
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
def run(self, parsed_args):
|
||||
client_args = {
|
||||
|
@ -14,17 +14,18 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import abc
|
||||
import six
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class Controller(object):
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
def __init__(self, client):
|
||||
self.client = client
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class CrudController(Controller):
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
@abc.abstractmethod
|
||||
def list(self, *args, **kw):
|
||||
|
@ -3,4 +3,5 @@ jsonschema>=2.0.0,<3.0.0
|
||||
pbr>=0.6,<1.0
|
||||
python-keystoneclient>=0.6.0
|
||||
requests>=1.1
|
||||
six>=1.6.0
|
||||
stevedore>=0.14
|
||||
|
Loading…
x
Reference in New Issue
Block a user