summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2015-06-15 09:14:07 -0700
committerJoshua Harlow <harlowja@gmail.com>2015-06-15 09:14:07 -0700
commit4923711d1f715a118e49697f680ccb748ca9f68e (patch)
treeff8ba0204da686285c4926a817c73e6378b7c873
parent86a184367c3cb99b3364d57f9674c6ae57ea3f27 (diff)
parentde7f6ad7df87aebcbde2aacf90969dba82476359 (diff)
downloadkazoo-4923711d1f715a118e49697f680ccb748ca9f68e.tar.gz
Merge pull request #337 from harlowja/type-error-strings
Reformat messages in type error exceptions strings in reconfig
-rw-r--r--kazoo/client.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/kazoo/client.py b/kazoo/client.py
index d706739..7850f4c 100644
--- a/kazoo/client.py
+++ b/kazoo/client.py
@@ -1405,13 +1405,14 @@ class KazooClient(object):
"""
if joining and not isinstance(joining, basestring):
- raise TypeError("joining must be a string")
+ raise TypeError("Invalid type for 'joining' (string expected)")
if leaving and not isinstance(leaving, basestring):
- raise TypeError("leaving must be a string")
+ raise TypeError("Invalid type for 'leaving' (string expected)")
if new_members and not isinstance(new_members, basestring):
- raise TypeError("new_members must be a string")
+ raise TypeError("Invalid type for 'new_members' (string "
+ "expected)")
if not isinstance(from_config, int):
- raise TypeError("from_config must be an int")
+ raise TypeError("Invalid type for 'from_config' (int expected)")
async_result = self.handler.async_result()
reconfig = Reconfig(joining, leaving, new_members, from_config)