#2063: Documentation for IRC bot configuration is wrong
--------------------+--------------------------------
Reporter: ajb | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Version: 0.8.3p1 | Keywords: documentation, irc
--------------------+--------------------------------
The manual currently describes configuring the IRC bot as:
{{{
from buildbot.status import words
irc = words.IRC("irc.example.org", "botnickname",
channels=[{"channel": "#example1"},
{"channel": "#example2",
"password": "somesecretpassword"}],
password="mysecretnickservpassword",
notify_events={
'exception': 1,
'successToFailure': 1,
'failureToSuccess': 1,
})
}}}
This was resulting in a failure to logon with the following backtrace:
{{{
2011-07-25 16:25:26+0100 [IrcStatusBot,client] Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/twisted/internet/tcp.py",
line 460, in doRead
return self.protocol.dataReceived(data)
File "/usr/lib/python2.6/dist-
packages/twisted/words/protocols/irc.py", line 2279, in dataReceived
basic.LineReceiver.dataReceived(self, data.replace('\r', ''))
File "/usr/lib/python2.6/dist-
packages/twisted/protocols/basic.py", line 251, in dataReceived
why = self.lineReceived(line)
File "/usr/lib/python2.6/dist-
packages/twisted/words/protocols/irc.py", line 2287, in lineReceived
self.handleCommand(command, prefix, params)
--- <exception caught here> ---
File "/usr/lib/python2.6/dist-
packages/twisted/words/protocols/irc.py", line 2331, in handleCommand
method(prefix, params)
File "/usr/lib/python2.6/dist-
packages/twisted/words/protocols/irc.py", line 1726, in irc_RPL_WELCOME
self.signedOn()
File "/usr/lib/python2.6/dist-
packages/buildbot/status/words.py", line 793, in signedOn
self.join(c)
File "/usr/lib/python2.6/dist-
packages/twisted/words/protocols/irc.py", line 1327, in join
if channel[0] not in CHANNEL_PREFIXES:
exceptions.KeyError: 0
}}}
After examining the code it seems it's looking for a simple list of
channels. For example:
{{{
from buildbot.status import words
irc = words.IRC("localhost", "buildbot",
channels=["#eng"],
password="buildbot_nick_pw",
notify_events={
'exception': 1,
'successToFailure': 1,
'failureToSuccess': 1,
})
c['status'].append(irc)
}}}
This configuration worked fine.
--
Ticket URL: <http://trac.buildbot.net/ticket/2063>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits