jaraco / irc

Full-featured Python IRC library for Python.
MIT License
392 stars 87 forks source link

irc.bot.get_version() fails with exception. #28

Closed jaraco closed 8 years ago

jaraco commented 8 years ago

The relevant exception is

#!python

TypeError: sequence item 0: expected string, int found

What happens is that irc.client.VERSION is a tuple of integers. In fact, it is tested that this is the case.

Problem is that bot.get_version() tries to do

#!python

'.'.join(irc.client.VERSION)

which raises the Type Error since it can't join said tuple of integers and instead expects a tuple of strings.

Easiest way to fix would be to change the above call to

#!python

'.'.join(map(str, irc.client.VERSION))

but I'm figuring you'll opt for a more readable fix and perhaps an accompanying test.


jaraco commented 8 years ago

Add irc.client.VERSION_STRING. Use that in irc.bot CTCP version call. Fixes #28.

→ <<cset 2a6c501088af>>


Original comment by: Jason R. Coombs