shizmob/pydle

on_raw_part raises a KeyError due to unexpected None

Closed this issue · 0 comments

When the Pydle client parts a channel, whether willingly (client initiated) or forcefully (kick / server initiated), a KeyError is raised.

This appears to be caused by trailing whitespace being incorrectly interpreted as a nickname.

https://github.com/Shizmob/pydle/blob/c040373514e564a26b624c6a8d52903bbd902055/pydle/features/rfc1459/client.py#L920-L926

Since " " isn't a valid username, the resulting logic that builds the list of users malfunctions, adding a None entry into a non-nullable field.
image

caused by #114