diff options
author | Joshua Harlow <harlowja@gmail.com> | 2015-02-10 13:54:32 -0800 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2015-02-10 13:54:32 -0800 |
commit | be3faf905ec4a14473a46c2ed4d0ca5aec4eb3c4 (patch) | |
tree | 2f12b6d0d293b2eae624fe4ecbc20e7dcd1ddb91 | |
parent | 13b92d9db4ad37d9550ef5c5abd323a2530a1e72 (diff) | |
parent | 13a0b8c8d59a577f725b9b056c397a60c013403f (diff) | |
download | zake-be3faf905ec4a14473a46c2ed4d0ca5aec4eb3c4.tar.gz |
Merge pull request #12 from kennethmyers/master
Changed attribute name "_data_watches" to "_data_watchers".
-rw-r--r-- | zake/fake_client.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/zake/fake_client.py b/zake/fake_client.py index 16bf914..6c4787f 100644 --- a/zake/fake_client.py +++ b/zake/fake_client.py @@ -70,7 +70,7 @@ class FakeClient(object): def __init__(self, handler=None, storage=None, server_version=None): self._listeners = set() self._child_watches = collections.defaultdict(list) - self._data_watches = collections.defaultdict(list) + self._data_watchers = collections.defaultdict(list) if handler is None: self._handler = k_threading.SequentialThreadingHandler() self._own_handler = True @@ -154,7 +154,7 @@ class FakeClient(object): @property def data_watches(self): - return self._data_watches + return self._data_watchers @property def listeners(self): @@ -218,7 +218,7 @@ class FakeClient(object): raise k_exceptions.NoNodeError("Node %s does not exist" % (path)) if watch: with self._watches_lock: - self._data_watches[path].append(watch) + self._data_watchers[path].append(watch) return (data, znode) def set_acls(self, path, acls, version=-1): @@ -243,7 +243,7 @@ class FakeClient(object): self._connected = True with self._watches_lock: self._child_watches.clear() - self._data_watches.clear() + self._data_watchers.clear() self.storage.attach(self) self.handler.start() self._partial_client.session_id = int(uuid.uuid4()) @@ -273,7 +273,7 @@ class FakeClient(object): exists = None if watch: with self._watches_lock: - self._data_watches[path].append(watch) + self._data_watchers[path].append(watch) return exists def exists_async(self, path, watch=None): @@ -358,7 +358,7 @@ class FakeClient(object): def fire_data_watches(self, data_watches): for (paths, event) in data_watches: - self._fire_watches(paths, event, self._data_watches) + self._fire_watches(paths, event, self._data_watchers) def _fire_watches(self, paths, event, watch_source): for path in reversed(sorted(paths)): @@ -394,7 +394,7 @@ class FakeClient(object): self._connected = False with self._watches_lock: self._child_watches.clear() - self._data_watches.clear() + self._data_watchers.clear() self.storage.purge(self) self._fire_state_change(k_states.KazooState.LOST) if self._own_handler and close_handler: |