Browse files

Fixed a small bug where trailing data was sometimes defaulting to Non…

…e, which caused a string of ":None" to be sent, when it should have been ignored. For example, if we look at part_channel() in the SimpleClient, we see that message defaults to a None value, and is passed to the trailing keyword of execute(). That None value was then being converted into a string of ":None" and appended to the parameters. execute() should ignore None values.

I'm not sure if that makes sense, but it wasn't that big of a bug, so no harm really.
  • Loading branch information...
1 parent 4ed757e commit e3e204e03901c75ad0bd269623fec504c9c30ad5 Evan Fosmark committed Dec 20, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 ircutils/connection.py
View
3 ircutils/connection.py
@@ -80,7 +80,8 @@ def execute(self, command, *params, **kwargs):
params = filter(lambda x:x is not None, params)
if "trailing" in kwargs:
params = list(params)
- params.append(":%s" % kwargs["trailing"])
+ if kwargs["trailing"] is not None:
+ params.append(":%s" % kwargs["trailing"])
self.push("%s %s\r\n" % (command.upper(), " ".join(params)))

0 comments on commit e3e204e

Please sign in to comment.