Merge pull request #165 from zalando/feature/abc-metaclass

Set metaclass of AbstractDCS with `six` to be python 2&3 compatible
This commit is contained in:
Alexander Kukushkin
2016-03-31 21:57:12 +02:00
+3 -3
View File
@@ -1,6 +1,7 @@
import abc
import json
import dateutil
import json
import six
from collections import namedtuple
from six.moves.urllib_parse import urlparse, urlunparse, parse_qsl
@@ -150,10 +151,9 @@ class Cluster(namedtuple('Cluster', 'initialize,leader,last_leader_operation,mem
return ([m for m in self.members if m.name == member_name] or [None])[0]
@six.add_metaclass(abc.ABCMeta)
class AbstractDCS(object):
__metaclass__ = abc.ABCMeta
_INITIALIZE = 'initialize'
_LEADER = 'leader'
_FAILOVER = 'failover'