Refine exception message

This commit is contained in:
mhchia 2019-07-31 16:23:07 +08:00
parent c0e253a524
commit ce369d47e9
No known key found for this signature in database
GPG Key ID: 389EFBEA1362589A

View File

@ -86,8 +86,8 @@ def gossipsubs(num_hosts, gossipsub_params):
def _make_pubsubs(hosts, pubsub_routers): def _make_pubsubs(hosts, pubsub_routers):
if len(pubsub_routers) != len(hosts): if len(pubsub_routers) != len(hosts):
raise ValueError( raise ValueError(
f"lenght of pubsub_routers={pubsub_routers} should be equaled to " f"lenght of pubsub_routers={pubsub_routers} should be equaled to the "
f"hosts={hosts}" f"length of hosts={len(hosts)}"
) )
return tuple( return tuple(
Pubsub( Pubsub(