summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Bangert <ben@groovie.org>2012-08-19 09:51:17 -0700
committerBen Bangert <ben@groovie.org>2012-08-19 09:51:17 -0700
commit1a0040f04e87e4020fc080848ec6637cef77f244 (patch)
tree447b807b31a73251236b3a133da2793ea33cd309
parent1242fcefd56d790dd532108167637ff70fe9b508 (diff)
downloadkazoo-1a0040f04e87e4020fc080848ec6637cef77f244.tar.gz
Wrap class level objects with static method so they can be used properly.
Fixes #17.
-rw-r--r--CHANGES.rst2
-rw-r--r--kazoo/handlers/gevent.py2
-rw-r--r--kazoo/handlers/threading.py2
3 files changed, 4 insertions, 2 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 2d4c68e..b9f525b 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -6,6 +6,8 @@ Changelog
Bug Handling
************
+- Issue #17 fixed: Wrap timeout exceptions with staticmethod so they can be
+ used directly as intended.
- Fixed bug with client reconnection looping indefinitely using an expired
session id.
diff --git a/kazoo/handlers/gevent.py b/kazoo/handlers/gevent.py
index 034656f..5a23cc2 100644
--- a/kazoo/handlers/gevent.py
+++ b/kazoo/handlers/gevent.py
@@ -101,7 +101,7 @@ class SequentialGeventHandler(object):
"""
name = "sequential_gevent_handler"
- timeout_exception = gevent.event.Timeout
+ timeout_exception = staticmethod(gevent.event.Timeout)
sleep_func = staticmethod(gevent.sleep)
def __init__(self, hub=None):
diff --git a/kazoo/handlers/threading.py b/kazoo/handlers/threading.py
index f2258b5..b090d01 100644
--- a/kazoo/handlers/threading.py
+++ b/kazoo/handlers/threading.py
@@ -166,7 +166,7 @@ class SequentialThreadingHandler(object):
"""
name = "sequential_threading_handler"
- timeout_exception = TimeoutError
+ timeout_exception = staticmethod(TimeoutError)
sleep_func = time.sleep
def __init__(self):