Skip to content

Commit de7f6ad

Browse files
author
Joshua Harlow
committed
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.
1 parent 86a1843 commit de7f6ad

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

kazoo/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,13 +1405,14 @@ def reconfig_async(self, joining, leaving, new_members, from_config):
14051405
14061406
"""
14071407
if joining and not isinstance(joining, basestring):
1408-
raise TypeError("joining must be a string")
1408+
raise TypeError("Invalid type for 'joining' (string expected)")
14091409
if leaving and not isinstance(leaving, basestring):
1410-
raise TypeError("leaving must be a string")
1410+
raise TypeError("Invalid type for 'leaving' (string expected)")
14111411
if new_members and not isinstance(new_members, basestring):
1412-
raise TypeError("new_members must be a string")
1412+
raise TypeError("Invalid type for 'new_members' (string "
1413+
"expected)")
14131414
if not isinstance(from_config, int):
1414-
raise TypeError("from_config must be an int")
1415+
raise TypeError("Invalid type for 'from_config' (int expected)")
14151416

14161417
async_result = self.handler.async_result()
14171418
reconfig = Reconfig(joining, leaving, new_members, from_config)

0 commit comments

Comments
 (0)