diff options
author | Jyrki Pulliainen <jyrki@spotify.com> | 2013-11-18 12:03:38 +0100 |
---|---|---|
committer | Jyrki Pulliainen <jyrki@spotify.com> | 2013-11-18 12:03:38 +0100 |
commit | 2a9adc48d5b6db28ee5f3426ba436e7444db96f2 (patch) | |
tree | 3a74ae44ba6fb2ebeffe89e2c624fa2fb555dd45 | |
parent | 684d8e03a3ad9595357147a8706ae7dbd441909e (diff) | |
download | kazoo-2a9adc48d5b6db28ee5f3426ba436e7444db96f2.tar.gz |
Fix silly typos and make the code a tad simpler.
In the end, we are only interested in the ConnectionClosed state, as
that is the only state when the completion queue won't be depleted.
-rw-r--r-- | kazoo/client.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/kazoo/client.py b/kazoo/client.py index 52da96c..b96dbbb 100644 --- a/kazoo/client.py +++ b/kazoo/client.py @@ -791,11 +791,7 @@ class KazooClient(object): @capture_exceptions(async_result) def do_create(): result = self._create_async_inner(path, value, acl, flags, trailing=sequence) - if isinstance(result.exception, ( - KeeperState.AUTH_FAILED, - KeeperState.CLOSED, - KeeperState.EXPIRED_SESSION, - KeeperState.CONNECTIONG)): + if isinstance(result.exception, ConnectionClosedError): # Closed connection might have set the exception for # the async_result object. If that is the case, we'll # raise the exception immediately |