Fixing pylint issues with cluster.py.
Project: http://git-wip-us.apache.org/repos/asf/helix/repo Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/80a4a13f Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/80a4a13f Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/80a4a13f Branch: refs/heads/master Commit: 80a4a13fd9b079e44737f06b7239bf14c7cbf3f1 Parents: 4bb86d8 Author: Casey Miller <[email protected]> Authored: Sun Feb 15 12:10:58 2015 -0800 Committer: Casey Miller <[email protected]> Committed: Sun Feb 15 12:10:58 2015 -0800 ---------------------------------------------------------------------- contributors/py-helix-admin/helix/cluster.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/helix/blob/80a4a13f/contributors/py-helix-admin/helix/cluster.py ---------------------------------------------------------------------- diff --git a/contributors/py-helix-admin/helix/cluster.py b/contributors/py-helix-admin/helix/cluster.py index 6b45557..e4d8b31 100644 --- a/contributors/py-helix-admin/helix/cluster.py +++ b/contributors/py-helix-admin/helix/cluster.py @@ -25,10 +25,10 @@ from resourcegroup import ResourceGroup from helixexceptions import HelixException from functions import RestHelixFunctions try: - from zkfunctions import ZookeeperHelixFunctions - zookeeper_ok = True + from zkfunctions import ZookeeperHelixFunctions + zookeeper_ok = True except ImportError: - zookeeper_ok = False + zookeeper_ok = False class BaseCluster(object): @@ -39,6 +39,7 @@ class BaseCluster(object): def __init__(self, cluster): super(BaseCluster, self).__init__() self.cluster = cluster + self.functions = None # dynamically loaded data below self._partitions = {} @@ -367,9 +368,9 @@ class BaseCluster(object): class Cluster(BaseCluster): def __init__(self, host, cluster): - super(Cluster, self).__init__(cluster) - self.host = host - self.functions = RestHelixFunctions(host) + super(Cluster, self).__init__(cluster) + self.host = host + self.functions = RestHelixFunctions(host) class ZKCluster(BaseCluster): @@ -378,7 +379,7 @@ class ZKCluster(BaseCluster): # We want to fail if kazoo cannot be found, but only if using the zookeeper object. if not zookeeper_ok: - raise ImportError + raise ImportError self.zookeeper_connect_string = zookeeper_connect_string self.zookeeper_root = zookeeper_root
