From de7f6ad7df87aebcbde2aacf90969dba82476359 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Fri, 12 Jun 2015 15:52:58 -0700 Subject: [PATCH] Reformat messages in type error exceptions strings in reconfig The rest of the type error exceptions follow a common style so this adjusts these new type error exceptions to follow this style. --- kazoo/client.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kazoo/client.py b/kazoo/client.py index d7067397..7850f4c2 100644 --- a/kazoo/client.py +++ b/kazoo/client.py @@ -1405,13 +1405,14 @@ def reconfig_async(self, joining, leaving, new_members, from_config): """ 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)