mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
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:
+3
-3
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user