[Buildbot-commits] [Buildbot] #2284: BuildMaster instance has no attribute 'statusTargets'

Buildbot nobody at buildbot.net
Fri May 18 11:43:36 UTC 2012


#2284: BuildMaster instance has no attribute 'statusTargets'
---------------------+--------------------
Reporter:  stepchen  |       Owner:
    Type:  defect    |      Status:  new
Priority:  major     |   Milestone:  0.8.7
 Version:  0.8.6p1   |  Resolution:
Keywords:            |
---------------------+--------------------

Comment (by toto):

 For refrence:

 code snipet:
 --------------------------------------
 def _mail_missing_message(self, subject, text):
         # first, see if we have a MailNotifier we can use. This gives us a
         # fromaddr and a relayhost.
         buildmaster = self.botmaster.master
         for st in buildmaster.statusTargets:
             if isinstance(st, MailNotifier):
                 break
         else:
             # if not, they get a default MailNotifier, which always uses
 SMTP
             # to localhost and uses a dummy fromaddr of "buildbot".
             log.msg("buildslave-missing msg using default MailNotifier")
             st = MailNotifier("buildbot")
         # now construct the mail

         m = Message()
         m.set_payload(text)
         m['Date'] = formatdate(localtime=True)
         m['Subject'] = subject
         m['From'] = st.fromaddr
         recipients = self.notify_on_missing
         m['To'] = ", ".join(recipients)
         d = st.sendMessage(m, recipients)
         # return the Deferred for testing purposes
         return d

 ---------------------------------------------------------------------------------
 File "/usr/local/lib/python2.6/dist-
 packages/buildbot-0.8.6p1-py2.6.egg/buildbot/buildslave.py", line 606, in
 _mail_missing_message

 for st in buildmaster.statusTargets:

 exceptions.[http://www.events-i-aarhus.dk AttributeError?]:
 [http://www.events-i-aarhus.dk BuildMaster?]
 [http://www.events-i-aarhus.dk/c/teambuilding teambuilding] instance has
 no attribute 'statusTargets'

 This is the only occurrence of statusTargets in master's source. Changing
 the field to just 'status' seem to have worked around the problem

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2284#comment:2>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list