[Buildbot-devel] Subclassing MailNotifier

Ben Hearsum bjhearsu at learn.senecac.on.ca
Wed Aug 23 05:38:30 UTC 2006


I am working on subclassing MailNotifier to sent tinderbox formatted
e-mails. I've hit a road block though. Sometime after the a callback is
added in buildMessage(), stepStarted() is attempt to be called from a
BuildStatus object. Here is the traceback from the logs:

2006/08/22 19:39 EDT [Broker,0,127.0.0.1] Unhandled error in Deferred:
2006/08/22 19:39 EDT [Broker,0,127.0.0.1] Traceback (most recent call last):
          File
"/usr/lib/python2.4/site-packages/twisted/internet/defer.py", line 107,
in maybeDeferred
            result = f(*args, **kw)
          File
"/usr/lib/python2.4/site-packages/buildbot/process/step.py", line 511,
in startStep
            d.addCallback(self._startStep_2)
          File
"/usr/lib/python2.4/site-packages/twisted/internet/defer.py", line 191,
in addCallback
            callbackKeywords=kw)
          File
"/usr/lib/python2.4/site-packages/twisted/internet/defer.py", line 182,
in addCallbacks
            self._runCallbacks()
        --- <exception caught here> ---
          File
"/usr/lib/python2.4/site-packages/twisted/internet/defer.py", line 307,
in _runCallbacks
            self.result = callback(self.result, *args, **kw)
          File
"/usr/lib/python2.4/site-packages/buildbot/process/step.py", line 532,
in _startStep_2
            self.step_status.stepStarted()
          File
"/usr/lib/python2.4/site-packages/buildbot/status/builder.py", line 828,
in stepStarted
            self.build.stepStarted(self)
          File
"/usr/lib/python2.4/site-packages/buildbot/status/builder.py", line
1152, in stepStarted
            receiver = w.stepStarted(self, step)
        exceptions.AttributeError: Deferred instance has no attribute
'stepStarted'

My class is defined as follows: class
TinderboxMailNotifier(mail.MailNotifier):

Other inherited methods such as sendMessage() work without issue. As far
as I can tell the inheritance tree goes StatusReceiver ->
StatusReceiverMultiService -> MailNotifier -> TinderboxMailNotifier

Any input would be appreciated.




More information about the devel mailing list